javascript部分の知識

11722 ワード


  
  
  
  
  1. 1.document.write("");    
  2. 2.JS //  
  3. 3. HTML :document->html->(head,body)  
  4. 4. DOM :window->(navigator,screen,history,location,document)  
  5. 5. :document.getElementById(" ID ").name( value)  
  6. 6. JS: document.getElementById("output").value = document.getElementById("input").value.toUpperCase();  
  7. 7.JS :String,Number,Boolean,Null,Object,Function  
  8. 8.JS :parseInt(),parseFloat()  
  9. 9.JS :(""+ )  
  10. 10.JS :(length)  
  11. 11.JS + .  
  12. 12.JS :== ,!= ,>,>=,<.<=  
  13. 13.JS :var  
  14. 14.JS :if(condition){}else{}  
  15. 15.JS :for([initial expression];[condition];[upadte expression]) {inside loop}  
  16. 16. :break 
  17. 17.JS :function functionName([parameter],...){statement[s]}  
  18. 18. form . document.forms[0],document.forms[1] .  
  19. 19. : window.open(),  :window.close(),  :self  
  20. 20. :window.status=" ";  
  21. 21. :window.alert(" ");  
  22. 22. :window.confirm();  
  23. 23. :window.prompt();  
  24. 24. :window.location.href="URL" 
  25. 25. :document.forms.length  
  26. 26. :document.close();  
  27. 27. :+=  
  28. 28. :document.createElement(),document.createTextNode()  
  29. 29. :document.getElementById()  
  30. 30. :  
  31. var form = window.document.forms[0]  
  32. for (var i = 0; i<!--       //-->  
  33. 49. JS:<script type="text/javascript" src="aaa.js"></script>  
  34. 50. HTML:<noscript></noscript>  
  35. 51. ONCLICK , a.html, b.html. :<a href="a.html" onclick="location.href='b.html';return false">dfsadf</a>  
  36. 52.JS :Array,Boolean,Date,Error,EvalError,Function,Math,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError  
  37. 53.JS :
     
  38. 54. :<script>function fullScreen(){ this.moveTo(0,0);this.outerWidth=screen.availWidth;this.outerHeight=screen.availHeight;}window.maximize=fullScreen;</script>  
  39. 55.JS all  
  40.    
  41. 56.JS :document.getElementByid(" ").tabIndex = 1  
  42. 57.innerHTML : <p id="para">"how are <em>you</em>"<p></p>, innerHTML :how are <em>you</em>  
  43. 58.innerTEXT , <em> .  
  44. 59.contentEditable ,isContentEditable .  
  45. 60.isDisabled .disabled  
  46. 61.length ,  
  47. 62.addBehavior() JS .htc  
  48. 63.window.focus() .  
  49. 64.blur() . FOCUS() .  
  50. 65.select() .  
  51. 66. :onfocus="this.blur()" 
  52. 67. :document.all.tags("div( HTML )").length  
  53. 68.JS : .window.showModaldialog(),window.showModeless()  
  54. 69. :window.status=' ', :window.defaultStatus = ' .';  
  55. 70. :external.AddFavorite("http://www.google.com","Google");  
  56. 71.JS :window.onerror = doNothing;  :window.onerror = handleError;  
  57. 72.JS :window.opener, opener.opener... .  
  58. 73.JS self  
  59. 74.JS :window.status=" " 
  60. 75.JS top  
  61. 76.JS :window.close();  
  62. 77.JS :if(confirm("Are you sure?")){alert("ok");}else{alert("Not Ok");}  
  63. 78.JS :window.navigate("http://www.google.com");  
  64. 79.JS :window.print()  
  65. 80.JS :window.prompt("message","defaultReply");  
  66. 81.JS :window.scroll(x,y)  
  67. 82.JS :window.scrollby  
  68. 83.JS :setInterval("expr",msecDelay) setInterval(funcRef,msecDelay) setTimeout  
  69. 84.JS IE4+ , NN :showModalDialog("URL"[,arguments][,features]);  
  70. 85.JS :function verifyClose(){event.returnValue="we really like you and hope you will stay longer.";}}   window.onbeforeunload=verifyClose;  
  71. 86. :onload()  
  72. 87. :onunload()  
  73. 88.window.location : protocol(http:),hostname(www.example.com),port(80),host(www.example.com:80),pathname("/a/a.html"),hash("#giantGizmo", ),href( )  
  74. 89.window.location.reload() .  
  75. 89-1.parent.location.reload() ( )  
  76. 89-2.opener.location.reload() ( )  
  77. 89-3.top.location.reload() ( )  
  78. 90.window.history.back() ,window.history.forward() ,window.history.go( , URL)  
  79. 91.document.write() ,document.writeln()  
  80. 92.document.body.noWrap=true; .  
  81. 93. .charAt( ), .  
  82. 94."abc".charCodeAt( ), ASCii .  
  83. 95. :string.concat(string2), +=  
  84. 96. .indexOf(" ", ), ( 0 )  
  85. 97.string.lastIndexOf(searchString[,startIndex]) .  
  86. 98.string.match(regExpression), .  
  87. 99.string.replace(regExpression,replaceString) .  
  88. 100.string.split( ) .  
  89. 101.string.substr(start[,length]) .  
  90. 102.string.toLowerCase() .  
  91. 103.string.toUpperCase() .  
  92. 104.parseInt(string[,radix( )]) .  
  93. 105.parseFloat(string[,radix]) .  
  94. 106.isNaN( ): .  
  95. 107. :const, :var</em>