
HTML中 vb JAVA脚本中回车键的问题
<html><head><scriptlanguage="vbscript">subtj()form1.submitform1.text1.value=""form1.t...
<html>
<head>
<script language="vbscript" >
sub tj()
form1.submit
form1.text1.value=""
form1.text1.focus
end sub
</script>
<title>发言界面</title>
</head>
<body onLoad="form1.text1.focus">
<form name="form1" method="post" target="rmiddle" action="userchat.asp">
<input type="text" name="text1" /><input type="button" name="tijiao" value="提交" onClick="tj" /><input type="reset" name="chongzhi" value="重置" />
</form>
</body>
</html>
现在代码鼠标单击提交,清空文本框里面的内容,
但是按回车只提交,不清空,请大家帮帮忙怎么让他
按回车后清空文本框里面的内容 展开
<head>
<script language="vbscript" >
sub tj()
form1.submit
form1.text1.value=""
form1.text1.focus
end sub
</script>
<title>发言界面</title>
</head>
<body onLoad="form1.text1.focus">
<form name="form1" method="post" target="rmiddle" action="userchat.asp">
<input type="text" name="text1" /><input type="button" name="tijiao" value="提交" onClick="tj" /><input type="reset" name="chongzhi" value="重置" />
</form>
</body>
</html>
现在代码鼠标单击提交,清空文本框里面的内容,
但是按回车只提交,不清空,请大家帮帮忙怎么让他
按回车后清空文本框里面的内容 展开
2个回答
展开全部
<html>
<head>
<script language="vbscript" >
sub tj()
form1.text2.value=form1.text1.value
form1.text1.value=""
form1.submit
form1.text1.focus
end sub
</script>
<title>发言界面</title>
</head>
<body onLoad="form1.text1.focus">
<form name="form1" method="post" target="rmiddle" action="userchat.asp">
<input type="hidden" name="text2" />
<input type="text" name="text1" /><input type="button" name="tijiao" value="提交" onClick="tj" /><input type="reset" name="chongzhi" value="重置" />
</form>
</body>
</html>
<head>
<script language="vbscript" >
sub tj()
form1.text2.value=form1.text1.value
form1.text1.value=""
form1.submit
form1.text1.focus
end sub
</script>
<title>发言界面</title>
</head>
<body onLoad="form1.text1.focus">
<form name="form1" method="post" target="rmiddle" action="userchat.asp">
<input type="hidden" name="text2" />
<input type="text" name="text1" /><input type="button" name="tijiao" value="提交" onClick="tj" /><input type="reset" name="chongzhi" value="重置" />
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询