怎样在文本框中输入时能触发一个按钮的click事件? form1.tempbtn.click()<input type="submit" name="tempbtn" value="提交"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以直接form1.submit()//提交的话 <input onkeydown="if(event.keyCode==13)messagek()"> <html><head><title>ÎÞ±êÌâÎĵµ</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>/////////////////////´Ë´¦Ôõôд£¿//////////////////<script language="javascript">function messagek(){ document.f.tempbtn.click()//´í}////////////////////////</script><body bgcolor="#FFFFFF" text="#000000"><form name=f><table width="100%" border="0" height="413"> <tr> <td> <form name="form1" method="post" action=""> <p> <input type="text" name="temptxt" onkeypress = "messagek()"> </p> <p> <input type="button" name="tempbtn" value="Ìá½»" onclick="alert('ok')"> </p> </form> </td> </tr></table></form></body></html> <input type='text' name='ipt' onkeydown="btn.onclick()"><button onclick="alert('你点击了我--button')" id='btn'>test</button >测试通过! <input type="text" name="temptxt" onkeypress = "messagek()">==><input type="text" name="temptxt" onkeypress = "document.form1.tempbtn.onclick()"><input type="button" name="tempbtn" value="提交" onclick='alert("test sucees!")'>肯定可以!是你写错了。看看我给你改过之后的! 麻烦大家帮我看一下这段代码,为什么alert不好用呢??!! 我想要做两次密码不同就警示和不输入完整信息就警示的操作! 有没有人能解决啊,发的贴从没人能解决,希望这次不一样。。。 日期年月日的级联,区分是否是闰年 finally{this.currentlyExecuting=false} 参数不对 text框的选中问题 表单问题 为什么说我没有权限???(关于修改iframe高度) 救命啊,帮我看看源代码啊。。。实现不了弹出窗口的? 有没有好上点的关于IE对象的help. 如何实现html下拉菜单提交后保留选中值而不返回默认值 两个方法的区别 如何让用户提交一个本地路径而不是文件。
form1.submit()//提交的话
<head>
<title>ÎÞ±êÌâÎĵµ</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
/////////////////////´Ë´¦Ôõôд£¿//////////////////
<script language="javascript">
function messagek()
{
document.f.tempbtn.click()//´í
}
////////////////////////
</script>
<body bgcolor="#FFFFFF" text="#000000">
<form name=f>
<table width="100%" border="0" height="413">
<tr>
<td>
<form name="form1" method="post" action="">
<p>
<input type="text" name="temptxt" onkeypress = "messagek()">
</p>
<p>
<input type="button" name="tempbtn" value="Ìá½»" onclick="alert('ok')">
</p>
</form>
</td>
</tr>
</table>
</form>
</body>
</html>
<button onclick="alert('你点击了我--button')" id='btn'>test</button >测试通过!
==>
<input type="text" name="temptxt" onkeypress = "document.form1.tempbtn.onclick()"><input type="button" name="tempbtn" value="提交" onclick='alert("test sucees!")'>肯定可以!是你写错了。看看我给你改过之后的!