Çë½ÌJavaScript¼üÅÌÎÊÌâ - Web ¿ª·¢ / JavaScript
Ôõô²ÅÄÜÅжϼüÅÌÊÇ·ñ±»°´ÏºÍËÉ¿ª¡£¡£¡£¡£¡£²»ÖªµÀÔõôÅжϡ£¡£¡£ËÄܸæËßÎÒÏÂÂ𡣡£¡£¡£Ð»Ð»
onkeydownºÍonkeyupʼþ
×Ô¶¯´¥·¢ÕâÁ½¸öʼþ
onkeydown °´ÏÂ
onkeyup ËÉ¿ª
onkeydown°´ÏÂʱ´¥·¢£¬onkeyupËÉ¿ªÊ±´¥·¢£¡
onkeydownºÍonkeyup
study
лл¸÷λʦ¸µ
3Â¥¸çÃÇ£¬ÕâÊÇ˰¡
onkeydownºÍonkeyupʼþ
onkeydown °´ÏÂ
onkeyup ËÉ¿ª
onkeydown¼üÅ̰´ÏÂ
onkeyup¼üÅ̵¯Æð
<script type="text/javascript">
function aa()
{
var y=document.getElementById('fname').value;
alert(y);
}
</script>
<input type="text" id="fname" onkeyup="aa()" /> //ËÉ¿ª
<input type="text" id="fname" onkeydown="aa()" /> //°´ÏÂ
<input type="text" id="fname" onkeypress="aa()" /> //¸ú°´ÏÂÒ»¸öЧ¹û
Ïà¹ØÎÊ´ð£º
ÎÊÌâÃèÊö£ºÓÐÒ»¸öÏÂÀÁбí¿ò£¬ÄÚÈÝÈçÏ£ºÌí¼Ó¡¢É¾³ý¡¢¸üС£ÓÐÕâÈý¸öÑ¡Ïî¡£
Óû§AµÇ¼µÄʱºòÓÐÌí¼Ó¡¢É¾³ý¡¢¸üÐÂÈý¸öȨÏÞ¡£
Óû§BµÇ¼µÄʱºòÖ»ÓиüÐÂȨÏÞ¡£
ÎÒÏëÅжϣ¬¼ÙÈç AµÇ¼ËùÓÐÑ¡Ïî¶¼ÏÔʾ£¨ÊǿɼûµÄ£©¡£
......
ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..
Ê×ÏȼÙÉèÒѾÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ ......
ÎÒÏëÎÊÒ»ÏÂÈçºÎÓÃjavascript¶¯Ì¬ÊµÏÖÏñÎÒÃÇÕâ¸öÍøÕ¾×ó±ßµÄĿ¼£¬Ð»À²£¡
??
ºÇºÇ£¡Ð»Ð»°¡£¡
¶¥Ò»ÏÂ
ÄãÃÇÊÇÊ²Ã´ÍøÕ¾°¡£¬ÒªÊǺǫ́ÊÇjavaÖ±½Ójsp£¬Èç¹ûºǫ́ÊÇc£¬ÄǾÍÓÃcgiÉú³Éxml£¬js¶¯Ì¬È¥¶ÁxmlµÄÊý¾Ý
Ó ......
¸÷λʹÓÃjsµÄ¸ßÊÖ. СµÜÎʼ¸¸öÎÊÌâ,Çë´ó¼Ò°ïæ½â´ð.À§ÈÅÁËÎÒ2¸öÐÇÆÚÁË.Ò»Ö±²»Ì«Ã÷°×.
±ÈÈç :
Div1 ÊÇÒ»¸ö²ã;
var myitem=new Item(document.getElem ......
Òª×öÒ»¸ö³é½±µÄС³ÌÐò£¬ÓÃVBscript+javascript£¬¹ö¶¯ÓÃjs,ÏÔʾºÍÊý¾Ý¿â²Ù×÷ÓÃvbs,ÏÖÔÚÏëÇëÎʸßÊÖ£¬¶¨Òåjs±äÁ¿µÄʱºò£¬ÄÜ·ñ°ÑvbsÊý¾Ý¿âÖвéѯֵ¸³¸øjsÖж¨ÒåµÄ±äÁ¿Â𣿸Ðл½â´ð£¡¾Ù¸öÀý×Ó£¿
»ù±¾ÉÏjsÒ²ÄܺÍvbsÒ»Ñù ......