Home > php教程 > php手册 > javascript动态加载方法

javascript动态加载方法

WBOY
Release: 2016-06-06 20:01:33
Original
1164 people have browsed it

script language="javascript" type="text/javascript" var newopen = function(i) { return function() { location.replace("http://blog.csdn.net/ajaxchen_615"); } } if (window.attachEvent) //IE { document.getElementById("btnan").attachEvent("onc

 

var newopen = function(i)

{

  return function()

  {

     location.replace("http://blog.csdn.net/ajaxchen_615");

  } 

}

if (window.attachEvent) //IE

{

    document.getElementById("btnan").attachEvent("onclick",newopen("popo"));

}

else //FF 谷歌

{

    document.getElementById("btnan").addEventListener("click",newopen("tyty"),false); 

}

 

 

//可实现方法重载

 

 

function chens(a,b,c,d)

{

this.a=a==null?alert("a"):"chen";

b==null?alert("b"):"";

c==null?alert("c"):"";

document.write(this.a);

this.d==null?alert("d"):"";

}

 

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template