【发布时间】:2013-05-08 23:01:05
【问题描述】:
我有一个 ASP 页面。
因为我有带有指定操作的表单元素
现在在这种形式中,我有一个元素,我在单击一个按钮时调用 JS func。
它正在调用 javascript 函数,然后调用默认表单操作。
为什么会这样?
我怎样才能只执行函数..?
代码:
<FORM METHOD="post" action="Update.asp" id=form name=form1 >
<td align=center width=10%><INPUT id=button1 type=submit ONCLICK="Gs_test()"
onmouseover="style.backgroundColor='blue'" onmouseout="style.backgroundColor='blue'" value=ABC name=submit1
style="width: 80%; height: 20px;background:blue; color:white; font-family:serif; font-size=medium; border-
color:black; border-width:1px" ></td>
<SCRIPT LANGUAGE="javascript">
function Gs_test()
{
alert("GSS");
}
</script>
'
【问题讨论】:
标签: javascript html asp-classic