javascript memo
1.javascript¤ÇURL¤Î"?"ÒÔ½µ¤Î¥Ñ¥é¥áー¥¿¤òÈ¡µÃ£º
var query = window.location.search.substring(1);
var pairs = query.split("&");
2.IEä¯ÀÀÆ÷ĬÈϵŦÄÜÍ£Ö¹
£¨Tab¼üÔÚµØÖ·À¸µÈÖеÄÒÆ¶¯Í£Ö¹£©
function stopDefaultKey(){
window.event.cancelBubble = true; //--- ¥¤¥Ù¥ó¥È¥Ð¥Ö¥ë¤ò¥¥ã¥ó¥»¥ë¤¹¤ë¡£
window.event.returnValue = false; //--- ¥¤¥Ù¥ó¥È¤Îreturn値¤òfalse¤Ë¤¹¤ë¡£
return false ;
}
3.javascript ¾²Ì¬±äÁ¿£¬Í¬Ò»¸öjsÎļþÖÐÉùÃ÷Ò»´Î£¬¶à´¦¿ÉÓÃ
this.±äÁ¿Ãû
4.javascriptµÄkeyCode
event.keyCode¡¡== 13 ⇒Enter
event.keyCode == 9 ⇒Tab
Ïà¹ØÎĵµ£º
---->ʲôÊÇÀàºÍ¶ÔÏó
ÕâÊÇËùÓÐÃæÏò¶ÔÏó±à³Ì֮ǰ±ØÐëŪÃ÷°×µÄ.
ËùνÀà:¼òµ¥µØËµ¾ÍÊÇÄ£°å,˵µÄרҵһЩ,ÊÇÒ»Àà¾ßÓÐijÖÖÐÔÖʵÄÎïµÄ¼¯ºÏ.±ÈÈç:È˾ÍÊÇÒ»¸öÀà,³µÒ²ÊÇÒ»¸öÀà,µÈµÈ.
Ëùν¶ÔÏó:¾ÍÊÇÀàµÄ¾ßÌåʵÏÖ.ÈçÉÏÃæËù˵,ÈËÊÇÒ»¸öÀà,Ò»¸ö¾ßÌåµÄÈ˾ÍÊÇÒ»¸ö¶ÔÏó,±ÈÈçÕÅÈý.
¶ÔÏóÊÇÀàµÄʵÀý»¯ºóµÄ½á¹û.ja ......
×¢Òâ:OptionÖеÄOÊÇÒª´óдµÄ£¬²»È»Óï·¨±¨´í
1.¶¯Ì¬´´½¨select
function createSelect(){
var mySelect = document.createElement("select");
mySelect.id = "mySelect";
  ......
$wnd and $doc Calling native JavaScript with JSNI
$wnd ÊÇʲô£¿
GWT provides the $wnd and $doc variables to refer to the window and document objects
GWTʹÓÃͨ¹ýJava Native methodʹÓÃËü£¬ÉùÃ÷Ò»¸önative·½·¨£¬½«º¬ÓÐJavaScriptµÄ·½·¨Ìå×¢ÊÍ¡£±àÒëÆ÷½«×¢ÊÍ¿éÄÚµÄÄÚÈÝÖð×ÖÊä³ö£¬Ê¹Ö®Óë±àÒë²úÉúµÄJavaScriptÕûº ......
Although the days of long and tedious code branches to target specific browsers in JavaScript are over, once in a while it's still necessary to do some simple code branching and object detection to ensure that a certain piece of code is working properly on a user's machine.
In this article, I ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>select-option onclick </title>
<script type="text/javascript" >
function simOptionClick4IE(){  ......