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

JavaScriptÓëDropDownList

´ó¼Ò¶¼ÖªµÀ£¬.NETÖÐһЩWeb·þÎñÆ÷¿Ø¼þ½âÎö²¢±àÒ룬×îÖÕ±»äÖȾµÄʱºò£¬ÆäʵÊÇת»¯³ÉÁËÆÕͨµÄhtml¿Ø¼þ£¬±ÈÈç<asp:LinkButton>¿Ø¼þ¾Í±»äÖȾ³ÉÁË<a>êµã¿Ø¼þ£¬ÕâÀïÒª½²µÄDropDownList¿Ø¼þÒ²Ò»Ñù£¬±»äÖȾ³ÉÁËÆÕͨµÄselect¿Ø¼þ£¬ÔÚÈçϵÄasp.netÒ³ÃæÖж¨ÒåÁËÒ»¸öweb·þÎñÆ÷¿Ø¼þDropDownListºÍÒ»¸öÆÕͨµÄselect¿Ø¼þ£¨Ö÷ҪΪÁ˶Աȣ©¡£
´úÂë
<asp:DropDownList ID = "ddlCities" runat = "server">
        <asp:ListItem Value = "0">³¤É³</asp:ListItem>
        <asp:ListItem Value = "1">±±¾©</asp:ListItem>
        <asp:ListItem Value = "2">Ìì½ò</asp:ListItem>
        <asp:ListItem Value = "3">Ä®ºÓ</asp:ListItem>
</asp:DropDownList>
       
<select id = "ddlNames" runat ="server">
        <option value = "0">James</option>
        <option value = "1">Green</option>
        <option value = "2">Lily</option>
        <option value = "3">Lucy</option>
</select>
¡¡¡¡ÔÚä¯ÀÀÆ÷Öв鿴¸ÃÒ³Ã棬²¢µã»÷²é¿´Ô´Îļþ£¬²»ÄÑ¿´³ö£¬asp.netÒ³Ãæ±»äÖȾ³ÉÁËÈçϸñʽ£º
´úÂë
<select name="ddlCities" id="ddlCitys">
    <option value="0">³¤É³</option>
    <option value="1">±±¾©</option>
    <option value="2">Ìì½ò</option>
    <option value="3">Ä®ºÓ</option>
</select>
       
<select name="ddlNames" id="ddlNames">
    <option value="0">James</option>
    <option value="1">Green</option>
    <option value="2">Lily</option>
 &nb


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

ÓÃjavascript²Ù×÷cookie¼òµ¥ÊµÀý

´úÂëÖ÷ÒªÊDzÙ×÷cookieµÄÁ½¸öº¯Êý£ºÒ»¸öÊÇsetCookieÓÃÓÚÉèÖÃcookieµÄÖµ£¬ÁíÍâÒ»¸öÊÇgetCookie ÓÃÓÚÈ¡cookieµÄÖµ£¬ÊµÏÖÁ˼òµ¥µÄcookie´æÈ¡²Ù×÷£¬ºÜ¼òµ¥£¬´úÂëÈçÏ£º
<mce:script language="JavaScript" type="text/javascript"><!--

function setCookie(name,value)
{
//ÓÃÓÚ´æ´¢¸³Öµ¸ødocument.cookieµÄc ......

javascriptÖеÄsrcelement

srcElement ÊÇDomʼþÖеÄʼþ×î³õÖ¸Åɵ½µÄÔªËØ¡£
±ÈÈçÓÐÒ»¸ödiv£¬ÀïÃæÓÐÒ»¸ö°´Å¥¡£ÄãÏìÓ¦divµÄonclickʼþ£¬µ«Êµ¼ÊÉÏ£¬Äãµ¥»÷µÄÖ»ÊÇËüÄÚ²¿µÄ°´Å¥£¬ÄÇô£¬srcElementÖ¸ÏòµÄ£¬¾ÍÊÇÄǸö°´Å¥¡£
srcElementÖ»ÔÚIEÖÐÓÐЧ¡£
ÔÚOperaϵÁÐä¯ÀÀÆ÷ÖжÔÓ¦µÄÊôÐÔÊÇtarget
¸øÄãÒ»¸öIEÏÂʹÓõÄÀý×Ó¡£
<!DOCTYPE html PUBLIC "-//W ......

javascript ¿çä¯ÀÀÆ÷µÄʼþϵͳ4

ÉÏ´Î˵µ½ÎÒÃÇÔÚÎÞ¾ú»·¾³ÖÐÉè¼ÆÁËÒ»¸öʼþ´úÀíº¯Êý£¬µ«ÐÔÄÜÊǸöÎÊÌ⣬½â¾öËüÎÒÃÇÐèÒª»º´æ½Úµã¼¯ºÏ£¬·¢Ïֽڵ㼯ºÏ²»×ãÒÔÓ¦¶ÔÐÂÇé¿öʱ£¬ÔÙÌæ»»Õâ¸ö½Úµã¼¯ºÏ£¬ÖØпªÊ¼Æ¥Åä¡£ÏÂÃæÊÇеķ½°¸£º

var delegate = function(selector,type,callback){
var els = $(selector);
addEvent(document,t ......

[javascript]¶àÐÐTextBox»Ø³µ»»ÐУ¬¹â±êÒƵ½×îĩβ

Ò³ÃæÆÁ±ÎÁ˻سµ£¬½á¹û¶àÐÐÊäÈëµÄTextbox±¯¾çÁË£¬Ö»ÄÜÓÃjsÖØд»Ø³µÊ¼þ£¬±¸·ÝÒ»ÏÂ
pageloadÀï
 txt_eng.Attributes.Add("onkeypress", "enter(this)");
js£º
function enter(obj) {
            if (event.keyCode == 13) {
    &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ