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

javascript stuffs

Primitive types
1. undefined, null, boolean, number, string; undefined is derived from null.
e.g. var tmp; typeof tmp == undefined.
e.g. void(javascript:aler(¡®x¡¯)) == undefined.
e.g. undefined==null
2. NaN!=NaN isNaN(¡°123¡±)==false isNaN(¡°blue¡±)==true
3. var num = 10; num.toString();num.toString(2);num.toString(8);num.toString(16) 4. parseInt, parseFloat 5. object class     properties: constructor, prototype     methods: hasOwnProperty(property), isPrototypeOf(object), propertyIsEnumberable(property),toString(),valueOf() 6. ÔÚBoolean±íʾ´óÖУ¬ËùÓжÔÏ󶼻ᱻ×Ô¶¯×ª»»Îªtrue 7. Number class: toFixed, MAX_VALUE, POSITIVE_INFINITE, NEGATIVE_INFINITE, toPrecision, toExponential 8. String: length, charAt(), concat, indexOf, lastIndexOf, localeCompare, compare, subString, slice, toLowerCase, toLowerCase, toUpperCase, toLocaleUpperCase, split 9. deleteÖ»ÄÜɾ³ý¿ª·¢Õß×Ô¶¨ÒåµÄ·½·¨ºÍÊôÐÔ¡£ 10. jsÖеĶÔÏóµÄÄÚÔÚ±íÕ÷ÊÇkey value¼¯ºÏ 11. js²»ÔÊÐíoverload 12. ÿ¸öº¯ÊýµÄµ÷ÓöÑÕ»Öж¼ÓÐÒ»¸öarguments¶ÔÏó 13. Function class:var f = new Function(argument1, argument2, ¡­, argumentN, function_body_string)       e.g. var f = new Function(¡°n¡±, ¡°alert(n)¡±) 14. ÅжÏʱÇøʹÓõÄÊÇ·ñÊÇÏÄÁîʱ      e.g. d1 = new Date(2008,6,1); d2 = new Date(2008,6,1); support = d1.getTimezonOffset()!=d2.getTimezoneOffset(); 15. undefined, NaN, Infinity, Object, Array, Function, Boolean, String, Number, Date, RegExp, Error, EvalError, ReferenceError, SyntaxError, TypeError, URIError 16. Math class: E,LN10,LN2,LOG2E,LOG10E,PI,SQRT1_2,SQRT2,min,max,ceil,floor,round,pow,exp,sin,cos,tan,atan,atan2,asin,acos 17. window.open(uri, [frame_name|top|parent|self|blank],parameter)       where parameter: left, top, height, width, resizable, scrollable, toolbar,


Ïà¹ØÎĵµ£º

ͨ¹ýjavascript»ñµÃurl²ÎÊý

Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£ 
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......

JSEclipse javaScript¿ª·¢¹¤¾ß°²×°ÅäÖÃ

ZendStudioÖа²×°JSEclipse²å¼þ
Help -> Install New SoftWare
Work with:     add
name:JSEclipse  Location:
http://download.macromedia.com/pub/labs/jseclipse/autoinstall
°²×°Íê³ÉºóÅäÖãº
ÐèÒª¸æËß Eclipse ËüÓÐÒ»¸ö JavaScript ÎļþµÄרÓñ༭Æ÷£¬ÕâÑùËüÓÃÎĽ«²»Ê¹ÓÃͨ±¾±à¼­Æ ......

javascript ÔÚ ie ºÍ firefox Çø±ð

1.document.formName.item("itemName") ÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
JQUERY:
$("#idName")
  &nb ......

javascriptѧϰÈÕÖ¾Èý

1¡¢¶ÔÏóÊôÐÔ£º.lengthΪ³¤¶ÈÊôÐÔ£¬
         .toUpperCase()Ϊ´óд×ÖĸÎı¾
2¡¢indexofº¯Êý·½·¨·µ»Ø×Ö·û´®ÄÚµÚÒ»´Î³öÏÖ×Ö·û´®µÄ×Ö·ûλÖã¬×Ö·û´®µÄλÖôÓ0¿ªÊ¼£¬Èç¹ûûÓÐÕÒµ½×Ó×Ö·û´®£¬Ôò·µ»Ø-1
3¡¢match()·½·¨¿ÉÓÃÀ´ÕÒµ½×Ö·û´®ÖÐÌض¨µÄ×Ö·û£¬Èç¹ûÕÒµ½Ôò·µ»ØÕâ¸ö×Ö·û£¬Èç¹ûûÓÐ ......

40ÖÖÍøÒ³³£ÓÃС¼¼ÇÉ(javascript)

<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">·µ»ØÉÏÒ»²½</a>
     
    1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
    <table border oncontextmenu=return(false)><td>no</table ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ