它们本来就是相互联系的。要隔离开好象不行。但是,你可以自行处理:
比如:要进行行为而不链接:
<a href="a.asp" onclick="dosomething();return false">xxx</a>
<script>
function dosomething()
{
alert()
}
</script>
比如:要进行行为而不链接:
<a href="a.asp" onclick="dosomething();return false">xxx</a>
<script>
function dosomething()
{
alert()
}
</script>
function run_submit(str)
{
var d;
d=mm_findobj(str);
if(checkall('theform')!=false)
d.submit();
} <form name="theform" method="post" action="" onSubmit="return checkall('theform')">
具体请看http://www.babiesjoy.com/product.asp左边的菜单,本来是onclick主菜单后才能显示子菜单,我现在改成onmouseover了,因为那样我的主菜单超链就失效了,那样他就做一件事情,显示子菜单,而我主菜单的产品不能再右边列出了。所以现在只好这样了<tr onmouseover="show()">了,但这样总觉得有点别扭!
<script>
function dosomething()
{
alert();
windows.open("a.asp","_blank"); // Or windows.open("a.asp","_self");
}
</script>window.open的用法:
===============================
<a href="#" onclick="dosomething();">xxx</a>
<script>
function dosomething()
{
alert("");
window.open("a.htm","_self"); //window.open("a.htm","_blank");
}
</script>