javascript:void(0)
javascript:void(0)
刚开始都不知道是啥意思
其实就是一个死链接,什么事情都不做。
<a id="link_${user.account}" href="javascript:void(0);" onclick="changSubmit();" style="cursor:pointer;height:25px;width:60px;margin-top:10px;">发送email</a>
这句话中的javascript:void(0) 就是一个死链接,什么事情都没做,主要的还是onclick事件。
常见的几种链接
1.window.open(''url'')
2.用自定义函数
<script>
function openWin(tag,obj)
{
obj.target="_blank";
obj.href = "Web/Substation/Substation.aspx?stationno="+tag;
obj.click();
}
</script>
<a href="javascript:void(0)" onclick="openWin(3,this)">株洲</a>
window.location.href="";
相关文档:
这个问题很简单,主要有下面几个知识点:
(1) 取得时间:var d=new Date();var time=d.toLocaleString()
(2) 显示在网页上,假设写在一个<span>中,且该<span>的id为showTime:
document.getElementById("showTime").innerHTML ......
在网上找到在IE下操作IFrame内容的代码:
document.frames["MyIFrame"].document.getElementById("s").style.color="blue";
但是这在Firefox下无效。
所以,想到在Firefox下用FireBug来调试。经过调试发现在Firefox下可用以下代码来实现:
document.getElementById("MyIFr ......
1. 网页中捕获JavaScript错误的两种方法:
使用 onerror 事件是一种老式的标准的在网页中捕获 Javascript 错误的方法
throw 声明的作用是创建 exception(异常)。你可以把这个声明与 try...catch 声明配合使用,以达到控制程序流并产生精确错误消息的目的。
2.两个JavaScript文件间函数的调用
http://space.flash8.net ......
CSDN的Blog比较强悍,一篇文章能写那么多,大家去出处看吧,那儿好看些:http://blog.csdn.net/panxuan/archive/2007/11/26/1902826.aspx
事件源对象
event.srcElement.tagName
event.srcElement.type
捕获释放
event.srcElement.setCapture();
event.srcElement.releaseC ......
① JavaScript添加位置,添加位置错误,会引起JavaScript代码无法执行的问题。
<head runat="server">
<script type='text/javascript' language="javascript">
<!—
//“添加内容”
//-->
</script>
</head>
② 引用他处的脚本 ......