怎样在文本框中输入时能触发一个按钮的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!")'>肯定可以!是你写错了。看看我给你改过之后的! 如何实现鼠标悬浮改变背景图片 js读取asp写入的cookies来判断评论权限 鼠标移动到一张图后 马上出现另一张图片 关于用JS控制DIV的问题 点击按钮选择要插入的图片,并且显示图片 新手求助此正则写法 查客户机器上安装的office 软件的版本呢 ie5版本以下的浏览器不支持中文对象名 有没有办法知道是否是当前页面空白部分获得了焦点? 一个入门的问题。谢谢大家啦。 两个方法的区别 如何让用户提交一个本地路径而不是文件。
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!")'>肯定可以!是你写错了。看看我给你改过之后的!