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 ......
要实现这个功能关键是要理解块的display属性。一个块的display属性设为none,就相当于这个块不存在。所以将要显示的多个块的display属性设为none,再根据需要将要显示的块的display属性设为block就可以做出标签页效果了。
(1) 建标签题以及各标签题所对应的显示内容:
<span id="span1 ......
创建RegExp对象实例的两种方式
1.使用RegExp对象的显示构造函数,语法为:new RegExp("pattern")[,"flags"];
2.使用RegExp对象的隐示构造函数,语法为:/pattern/flags;
3.flags为以下标志字符的组合
(1).g作全局标志,如果没有,匹配第一个
(2). i 忽略大小写
(3).m 多行标志
正 ......
function getHeight(){
var yScroll;
if (window.innerHeight && window.scrollMaxY) {
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offs ......
<a href="#" onclick="ChildNode(this);">aaa</a>要改为
<a href="#" onclick="ChildNode(event);">aaa</a>
无法取得this对象,要用以下方法来取得。
function ChildNode(e)
{
var evt = e ? e : (window.event ? window.event : null); //此方法为了在firefox中的兼容
var node = evt.srcEl ......