易截截图软件、单文件、免安装、纯绿色、仅160KB

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="";


相关文档:

JavaScript显示时间

这个问题很简单,主要有下面几个知识点:
(1)       取得时间:var d=new Date();var time=d.toLocaleString()
(2)       显示在网页上,假设写在一个<span>中,且该<span>的id为showTime:
document.getElementById("showTime").innerHTML ......

javascript获取iframe文档内容(兼容IE和Firefox)

在网上找到在IE下操作IFrame内容的代码:
   
document.frames["MyIFrame"].document.getElementById("s").style.color="blue";
但是这在Firefox下无效。
所以,想到在Firefox下用FireBug来调试。经过调试发现在Firefox下可用以下代码来实现:
   
document.getElementById("MyIFr ......

JavaScript summary

1. 网页中捕获JavaScript错误的两种方法:
使用 onerror 事件是一种老式的标准的在网页中捕获 Javascript 错误的方法
throw 声明的作用是创建 exception(异常)。你可以把这个声明与 try...catch 声明配合使用,以达到控制程序流并产生精确错误消息的目的。
2.两个JavaScript文件间函数的调用
http://space.flash8.net ......

javascript大集合

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添加位置,添加位置错误,会引起JavaScript代码无法执行的问题。
<head runat="server">
<script type='text/javascript' language="javascript">
<!—
//“添加内容”
//-->
</script>
</head>
 
② 引用他处的脚本 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号