Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javascript¿ª·¢ÏµÁÐ(DOM²Ù×÷)

Ñ¡ÔñÔªËØ£ºdocument.getElementsByTagName£¬document.getElementsById,document.getElementsByName¡£
               firstChild,lastChild,nextSibling£¬previousSibling
´´½¨ÔªËØ£ºdocument.createElement(),appendChild();
ɾ³ýÔªËØ£ºremoveChild();
ʵÀý£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>ÎÞ±êÌâÒ³</title>
    <style>
      .txt{ color:Red; border:solid 1px #ff0000}
    </style>
     <script type="text/javascript">
    
       function chElement()
       {  
        var txtAry=document.getElementsByTagName("input");
        document.getElementsByTagName
        for(i=0;i<txtAry.length;i++)
        {
          alert(txtAry[i].id);
        }
       }
      
    function crtElement()
    {
     var obCrt=document.getElementById("dvCreate");
     var obTxt=document.createElement("input");
     obTxt.type="text";
     obTxt.id="crtTxt";
     dvCreate.appendChild(obTxt);
    }
   
    function setAtr()
    {
      //var strColor="#ff0000";
     // (document.body.bgColor=='#ffffff')?doc


Ïà¹ØÎĵµ£º

kangax µÄjavascriptÃÕÌâ

µÚÒ»Ìâ
(function(){
return typeof arguments;
})();
//ÎÊ×Ô¶¯Ö´Ðк¯Êý»á·µ»Øʲôֵ

// ¾ÍÊÇ¿¼Arguments¶ÔÏóµÄtypeof
// ¿´Æ½Ê±ÓÃfirebug¶à²»¶àÁË¡­¡­
µÚ¶þÌâ
var f = function g(){ return 23; };
typeof g();
//ÎÊ×îºóÒ»ÐеÄÖ´Ðнá¹û

//¸ù¾Ý±ê×¼£¬ÃüÃûº¯Êý±í´ïʽµÄº¯ÊýÃûÖ»¶Ôº¯Êý ......

ÇÉÓÃjavascript»ñµÃÏÂÔصØÖ·

ͻȻ¼äÏëÈ¥ÏÂÊ×fire in the holeµÄÁåÉù£¬ÓÚÊÇÓÃsosoÕÒÁËһϣ¬½øÈëÁËÊÖ»úÀÖÔ° £¨http://download.shouji.com.cn/do/wave?html=&inputname=wave&wname=Fire+in+the+hole+&thsubmit=%E6%90%9C%E7%B4%A2£©£¬Ñ¡Ôñfire in the hole£¬µ¯³ö¸ö´°¿Ú£¬ÌáʾÈÃÊäÈëÊÖ»úºÅÂë¡£ÔÎËÀ£¬²»¾ÍÏÂÊ׸èÂ»¹²»ÈÃÖ±½ÓÏ¡£ºÇºÇ£¬·¢ÏÖÍ ......

JavaScript£¬µÈ±ÈÀýËõ·ÅͼƬµÄº¯Êý

<script language="JavaScript">
<!--
//ͼƬ°´±ÈÀýËõ·Å
var flag=false;
function DrawImage(ImgD,iwidth,iheight){
    //²ÎÊý(ͼƬ,ÔÊÐíµÄ¿í¶È,ÔÊÐíµÄ¸ß¶È)
    var image=new Image();
    image.src=ImgD.src; ......

Javascript: onresize

ä¯ÀÀÆ÷£ºIE 8¡¢FF 3.6¡¢Chrome 4.0¡¢Safari 4.0¡¢Opera 10.1
½öÓÐIEä¯ÀÀÆ÷Ö§³ÖHTMLElement.onresize£¨±ÈÈçbody.onresize£©
ÆäËüä¯ÀÀÆ÷Ö»Ö§³Öwindow.onresize
ÏÈ˵IEµÄHTMLElement.onresize
ʹÓÃÇ°ÇëÈ·¶¨ÄãµÄÐÄÔ༰ѪѹÕý³££¬Èç¹ûÄ㶨ÒåÁË
body.onresize = function(){……}»òÕßhtml.onresize = obj.fun;
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ