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