<script>
function testID()
{
document.forms[0].test.value="OK";
alert(document.forms[0].test.value)
return true;
}
</script>
......
......
<form action="" method=post onsubmit="return testID();">
显示内容:<input type=text name="test">
<input type=submit value="测试">
</form>
function testID()
{
document.forms[0].test.value="OK";
alert(document.forms[0].test.value)
return true;
}
</script>
......
......
<form action="" method=post onsubmit="return testID();">
显示内容:<input type=text name="test">
<input type=submit value="测试">
</form>
解决方案 »
- js如何在打开网页时,用代码来让文本框获得焦点
- javascript引擎PK:V8 vs Spidermonkey
- 插件的开发
- 请教关于for 的问题!
- iframe width = 100%失效。。ie火狐
- 一个有关复杂表格(不规则)表格排序问题
- document.write("<p>hello word</p>");
- 【求助】数据导入的问题
- 自做的控件有一方法,返回VARIANT变量类型,在javascript中如何能使用该VARIANT数据?
- html 中 a 标签怎么改成post提交使用jquery创建表单形式
- 如何判断一个对象是否存在?javascript
- 独孤龙大哥,及各位大哥大姐救小弟我!(我没分了,实在对不起)
function testID()
{
document.all.test.value="OK";
return true;
}
</script>