很简单的问题,不知道为啥到国外的服务器上就不行了。
我本机上没有问题,而其在国内的好多服务器上都用过,没有问题
代码如下<input type="hidden" name="content" id="content" value="" >
<iframe src="editor/editor.html?id=content" frameborder="0" scrolling="no" width="700" height="320"></iframe>
但是在服务器上获取content的值,获取不到。
下面是判断var content=document.form1.content.value;
alert(“aaaa"+content); if(content.length == 0 || content == null)
{
alert("正文不能为空,请重新输入!");
return false;
}
在线等
我本机上没有问题,而其在国内的好多服务器上都用过,没有问题
代码如下<input type="hidden" name="content" id="content" value="" >
<iframe src="editor/editor.html?id=content" frameborder="0" scrolling="no" width="700" height="320"></iframe>
但是在服务器上获取content的值,获取不到。
下面是判断var content=document.form1.content.value;
alert(“aaaa"+content); if(content.length == 0 || content == null)
{
alert("正文不能为空,请重新输入!");
return false;
}
在线等
解决方案 »
- php 遍历字段
- 关于iconv函数的一个问题
- http服务装在PC1上,把要下载的大文件放在PC2上,如何设置?
- PHP的Smarty模板会重复连接数据库?
- 发布一套新的框架,带(pfc基础类、一个程序的实例)
- php 写的验证码 ,帮忙看看有什么毛病?
- 怎样来写最合理的 mysql_connect
- 有关PHP和ORACLE的连接,请教!
- Win98+PWS+PHP下Undefined variable的问题
- Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given i
- PHP中.htaccess Rewrite的问题
- java至php的乱码问题
function submits()
{
var content=document.getElementById("content").value;
document.getElementById("artistname").value=value;
if(content.length == 0 || content == null)
{
alert("正文不能为空,请重新输入!");
return false;
}
return true;
}
</script>
<input type="hidden" name="content" id="content" value="" >
<iframe src="editor/editor.html?id=content" frameborder="0" scrolling="no" width="700" height="320"></iframe><input type="submit" name="action" value="发布" id="action" onClick="return submits();">
这样改明白了吧,我点击发布,但是获取不到content的值
1)调用编辑器的js接口获取内容
2)编辑器自动绑定表单onsubmit事件,在submit前,对一个hidden对象赋值.
看你的调用形式,应该是第2种. 那你应该检查一下A.编辑器是否放在<form>里面
B.编辑器是否能正确绑定了onsubmit事件.