我想问一个有关取消form表单提交的问题 你改了也要到第二次才行啊,这个函数返回的还是true,最好不要这样编码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="JavaScript">function asd(){alert("ok")return false}</script><html><body><form action="gh.html"><input type="submit" onClick="return asd();"></form></body></html> Sorry 哦,回答的有点急,没看清你的意思,牛头不对马嘴了,呵呵。 <form action="gh.html" onsubmit= "asd()"><input type="submit">因该这样吧 <html><script language="JavaScript">function asd(){alert("ok")document.getElementById("io").onclick="return false"}</script><body><form action="gh.html" onsubmit="return asd()"><input type="submit"></form></body></html> <html><script language="JavaScript">function asd(){return confirm('你确定要提交吗?');}</script><body><form action="gh.html" onsubmit="return asd()"><input type="submit"></form></body></html> 关于将网页设为主页的问题,请高手赐教 求助mxgraph问题 document.createElement('img')的问题 求一个严格的浮点数正则表达式 javasript userData使用问题 如何用JAVASCRIPT控制panel的显示? js与下拉框 制作请教代码 如何用javascript实现树型导航菜单 显示文本变成输入框 回调函数能这么写吗 如何控制div的显示或不显示 请问如何将超链接的字体由粗体变成正常?
function asd()
{
alert("ok")
return false
}
</script>
<html>
<body>
<form action="gh.html">
<input type="submit" onClick="return asd();">
</form>
</body>
</html>
<input type="submit">
因该这样吧
<script language="JavaScript">
function asd()
{
alert("ok")
document.getElementById("io").onclick="return false"
}
</script>
<body>
<form action="gh.html" onsubmit="return asd()">
<input type="submit">
</form>
</body>
</html>
<script language="JavaScript">
function asd()
{
return confirm('你确定要提交吗?');
}
</script>
<body>
<form action="gh.html" onsubmit="return asd()">
<input type="submit">
</form>
</body>
</html>