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 ......
创建RegExp对象实例的两种方式
1.使用RegExp对象的显示构造函数,语法为:new RegExp("pattern")[,"flags"];
2.使用RegExp对象的隐示构造函数,语法为:/pattern/flags;
3.flags为以下标志字符的组合
(1).g作全局标志,如果没有,匹配第一个
(2). i 忽略大小写
(3).m 多行标志
正 ......
/**
* 取得字符串的字节长度
*/
代码
function strlen(str)
{
var i;
var len;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=2; else len++;
}
return l ......
<table>
<tr>
<td style="width: 201px; height: 22px;" valign="middle" align="right">
&n ......