非SUBMIT按钮如何响应回车键 onkeypress=if(window.event.keyCode==13)... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title> New Document </title><meta name="Generator" content="EditPlus"><meta name="Author" content="Seagle.K"><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script language="JavaScript">function submitaction(thisform, force){ if (event.keyCode == 13 || force == 1) { alert('帐号:' + thisform.txt.value + '\n' + '密码:' + thisform.pwd.value); if (confirm('I\'m a common button,would u submit for sure?')) { thisform.submit(); } }}</script><style type="text/css"></style></head><body><form method="POST" action="" target="_blank" onkeydown="submitaction(this, 0)">帐号:<input type="text" name="txt" value=""><br>密码:<input type="password" name="pwd" value=""><br><input type="button" value="submit" name="btn" onclick="submitaction(this.form, 1)"></form></body></html> 文本框内容改变,onchange事件没有触发【高分求救,万分感谢】 求JS高手给个思路,像这种http://onlinecatalogueasia.ikea.com/2011/ikea_catalogue/CN/ javaScript与Jquery函数问题 帮忙看看这段脚本,有个不明白的地方,新手学JAVA脚本 请高手对我指指点点 获取父元素失败请指教 javascript 面向对象 取消WEB下载功能 javascript:parent.nullframe什么意思? 一个简单的问题! 请问如何向动态创建的iframe中添加子元素? 在问按钮控制滚动!50分 关于iframe的问题
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="Seagle.K">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
function submitaction(thisform, force)
{
if (event.keyCode == 13 || force == 1)
{
alert('帐号:' + thisform.txt.value + '\n' + '密码:' + thisform.pwd.value);
if (confirm('I\'m a common button,would u submit for sure?'))
{
thisform.submit();
}
}
}
</script>
<style type="text/css"></style>
</head>
<body>
<form method="POST" action="" target="_blank" onkeydown="submitaction(this, 0)">
帐号:<input type="text" name="txt" value=""><br>
密码:<input type="password" name="pwd" value=""><br>
<input type="button" value="submit" name="btn" onclick="submitaction(this.form, 1)">
</form>
</body>
</html>