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

javascript»ñÈ¡selectµÄֵȫ½â

»ñÈ¡ÏÔʾµÄºº×Ö
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
»ñÈ¡Êý¾Ý¿âÖеÄid
window.document.getElementById("bigclass").value
»ñÈ¡select×é·ÖÅäµÄË÷Òýid
window.document.getElementById("bigclass").selectedIndex
Àý×Ó£º
<select name="bigclass" id="bigclass" onChange="javascript:updatePage2();">
<option value="" selected="selected">ajaxʵÑé</option>
<option value="4">ÎÒÊÊÒËÊйþ</option>
</select>
ʹÓÃ
document.getElementById("bigclass").options[window.document.getElementById("bigclass").selectedIndex].text
µÄ½á¹ûÊÇ£ºÎÒÊÊÒËÊйþ
ʹÓÃ
window.document.getElementById("bigclass").value
µÄ½á¹ûÊÇ£º4
ʹÓÃ
window.document.getElementById("bigclass").selectedIndex
µÄ½á¹ûÊÇ£º1
Ò»¡¢ÐÂÔöÒ»¸öoption
    var sel=document.getElementById("selectµÄid");
    var op=document.createElement("option");
     op.value=Öµ;
     op.text=ÏÔʾÎı¾;
     sel.add(op);
¶þ¡¢É¾³ýÒ»¸öoption
    var sel=document.getElementById("typelist");
if(sel.selectedIndex==-1)
   alert("ÇëÑ¡ÖÐҪɾ³ýµÄÏî!");
for(var i=0;i<sel.options.length;i++){
if(sel.options[i].selected){
sel.options.remove(i);
break;
}
}
Èý¡¢Çå¿ÕselectµÄËùÓÐoption
   var citySel=document.getElementById("selectµÄid");
   citySel.options.length=0;
  
ËÄ¡¢»ñµÃÑ¡ÖÐÏîµÄÖµ
    var citySel=document.getElementById("selectµÄid");
    var selectedValue=citySel.value;
Îå¡¢»ñµÃµ±Ç°Ñ¡ÖÐÏîµÄË÷Òý
    var selectedIndex=document.all.objSelect.selectedIndex;
Áù¡¢ÉèÖÃselectµÄµ±Ç°Ñ¡ÖÐÏî
    ·½·¨1(µ¥¸öselect)£º document.getElementById("products_type_id").selectedIndex=1;
    ·½·¨2(¼¶ÁªselectÈçÊ¡Êм¶Áª)£º
     var province_sel=document.getElementById("province");//


Ïà¹ØÎĵµ£º

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ ÊÕ²Ø

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ ÊÕ²Ø
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4 ......

JavaScript ¸´Ñ¡¿òÈ«Ñ¡£¨¶þ£©

 
Code:
<!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>
<title>ÎÞ±êÌâÒ³</title>
<mce:script language="javascript" type="te ......

javascriptµÄdelete

¸Õ¸Õ°Ý¶ÁÁË JavascriptµÄ±äÁ¿Óëdelete²Ù×÷·û ºÜÊÜÆô·¢¡£Ô­ÎÄֻ˵Á˽á¹û£¬Ã»¸üÉîÈëÍÆÀí×ܽáÒ»ÏÂΪʲô£¬ÒÔ¼°ÔõôÀí½âºÃÒ»µã£¬ÎÒÕâÀï²¹³ä×ܽáһϡ£
 /// <reference path="http://tech.idv2.com/2008/01/09/javascript-variables-and-delete-operator/" />
/*
Óëc++²»Í¬£¬javascriptµÄdelete²»»áɾ³ ......

¼«¾­µäµÄJavaScript¿ò¼Üprototype.jsÖÐʵÏּ̳еķ½·¨

 ±¾ÎÄ·ÇÔ­´´
   
Object.extend = function(destination, source) {
for (var property in source) {
    destination[property] = source[property];
}
return destination;
}
Prototype ¶ÔObjectÀའ......

JavaScriptͨÓÃAlertÃÀ»¯Àà

function sAlert(msg,boxtype,func,msgtitle)
sAlert('ÐÅÏ¢ÄÚÈÝ',1,'','ÐÅÏ¢±êÌâ')
@msg:ÌáʾÐÅÏ¢ÄÚÈÝ
@boxtype£º1Ϊµ¯³ö¿ò£¬2ΪȷÈÏ¿ò£¬3ΪÌáʾ¿ò
@func:µãÈ·ÈÏʱִÐеĺ¯Êý
@title:ÐÅÏ¢¿ò±êÌâÎÄ×ÖÄÚÈÝ
Ö»ÓÐmsgÊDZØÐëµÄ£¬ºóÃæµÄ²ÎÊý¿ÉÒÔÊ¡ÂÔ¡£Èç¹ûÖмäµÄ²ÎÊýΪ¿ÕÔòÔÚ¶ÔӦλÖÃÉÏ''»òÕß""±íʾ£¨¸ù¾Ýʵ¼ÊÇé¿öÑ¡Ôñµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ