好象要这样写吧:
<body>
<form name = "form1">
<input type = "button" onclick = "doClick()">
</form>
</body>
<body>
<form name = "form1">
<input type = "button" onclick = "doClick()">
</form>
</body>
解决方案 »
- 请教一个DOM节点的问题
- JavaScript模拟 超类 子类的问题
- prototype Ajax.Updater动态请求的页面的函数用不了
- 同时点中2个按纽的问题
- 网页打印问题
- 下拉列表,列表框大小一定,但要让他的下拉列表有多长就显示多长如何实现
- 【easyui-datagrid】父页面不能直接取到子页面的datagrid
- 我想得到几个单选框中的被选中的值,并将此值付给一个文本框中,这样的脚本怎么写?谢谢
- 函数调用!在线等!多谢!
- 请问下提交表单中的全国省市三级联动之后,怎么在修改表单中让三级联动选中值为提交的值?
- HTC是什么呀?哪位大哥有相关的学习资料?
- 访问iframe中的iframe中的对象
<html>
<script>
function submitForm(formName)
{
var obj = formName
var loc = "action.asp?"
with(obj)
{
for(i = 0; i < elements.length; i++)
{
if(elements[i].value != "submit")
loc = loc + elements[i].id + "=" + elements[i].value + "&"
}
loc = loc.substr(0, loc.length-1)
alert(loc)
window.location = loc
}
}
</script>
<body>
<img src="xbm.asp">
<form name="frm">
<input type="text" value="hello!" name="text1" ID="Text1">
<input type="text" value="hello!" name="text1" ID="Text2">
<input type="text" value="hello!" name="text1" ID="Text3">
<input type="button" value="submit" onclick="submitForm(frm)">
</form>
</body>
</html>action.asp为要提交到的页
<input type = "button" onclick = "document.all.form1.submit()">
</form>
要用id不能用name