JavaScript»ù´¡Ó¦ÓÃ
JavaScript¾ÍÕâô»ØÊÂ1£º»ù´¡ÖªÊ¶
1 ´´½¨½Å±¾¿é
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script>
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”JavaScript”>
2: <!--
3: document.write(“Hello”);
4: // -->
5: </script>
ÔÚ²»Ö§³ÖJavaScriptµÄä¯ÀÀÆ÷Öн«²»Ö´ÐÐÏà¹Ø´úÂë
3 ä¯ÀÀÆ÷²»Ö§³ÖµÄʱºòÏÔʾ
1: <noscript>
2: Hello to the non-JavaScript browser.
3: </noscript>
4 Á´½ÓÍⲿ½Å±¾Îļþ
1: <script language=”JavaScript” src="/”filename.js"”></script>
5 ×¢Êͽű¾
1: // This is a comment
2: document.write(“Hello”); // This is a comment
3: /*
4: All of this
5: is a comment
6: */
6 Êä³öµ½ä¯ÀÀÆ÷
1: document.write(“<strong>Hello</strong>”);
7 ¶¨Òå±äÁ¿
1: var myVariable = “some value”;
8 ×Ö·û´®Ïà¼Ó
1: var myString = “String1” + “String2”;
9 ×Ö·û´®ËÑË÷
1: <script language=”JavaScript”>
2: <!--
3: var myVariable = “Hello there”;
4: var therePlace = myVariable.search(“there”);
5: document.write(therePlace);
6: // -->
7: </script>
10 ×Ö·û´®Ìæ»»
1: thisVar.replace(“Monday”,”Friday”);
11 ¸ñʽ»¯×Ö´®
1: <script language=”JavaScript”>
2: <!--
3: var myVariable = “Hello there”;
4: document.write(myVariable.big() + “<br>”);
5: document.write(myVariable.blink() + “<br>”);
6: document.write(myVariable.bold() + “<br>”);
7: document.write(myVariable.fixed() + “<br>”);
8: document.write(myVariable.fontcolor(“red”) + “<br>”);
9: document.write(myVariable.fontsize(“18pt”) + “<br>”);
10: document.write(myVariable.italics() + “<br>”);
11: document.write(myVariable.small() + “<br>”);
12: do
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
²Î¼ÓJavaScriptÃæÊÔ£¬±ØÐë¸ã¶®µÄÎÊÌ⣨ÍƼö£©
Ò». JavaScriptÖеĶÔÏó.
JavaScriptÖеÄObjectÊÇÒ»×éÊý¾ÝµÄkey-valueµÄ¼¯ºÏ, ÓеãÀàËÆÓÚJavaÖеÄHashMap, ËùÓÐÕâЩÊý¾Ý¶¼ÊÇObjectÀïµÄproperty.
ͨ³£Çé¿öÏÂ, JavaScriptÖн¨Á¢Ò»¸ö¶ÔÏóÓÃ"new"¼ÓÉÏconstructor functionÀ´ÊµÏÖ.
Èçnew Date(), new Object()µÈ.
var bo ......
1 Add the following code to .aspx
<script>
function fresh() {
{
window.opener.document.getElementById("ControlId").click(); //ControlId -- ......
ͻȻ¼äÏëÈ¥ÏÂÊ×fire in the holeµÄÁåÉù£¬ÓÚÊÇÓÃsosoÕÒÁËһϣ¬½øÈëÁËÊÖ»úÀÖÔ° £¨http://download.shouji.com.cn/do/wave?html=&inputname=wave&wname=Fire+in+the+hole+&thsubmit=%E6%90%9C%E7%B4%A2£©£¬Ñ¡Ôñfire in the hole£¬µ¯³ö¸ö´°¿Ú£¬ÌáʾÈÃÊäÈëÊÖ»úºÅÂë¡£ÔÎËÀ£¬²»¾ÍÏÂÊ׸èÂ»¹²»ÈÃÖ±½ÓÏ¡£ºÇºÇ£¬·¢Ï ......
×Ô¼ºÔÚ¿ª·¢ÖÐÅöµ½µÄ+ÁËһЩÔÚÍøÉÏËѵ½µÄ¡£¡£ºÍ´ó¼Ò·ÖÏíÏ¡£
DropdownlistÎÞˢеÄÀý×Ó¡£xml.
ÀýÈçÎı¾ÑéÖ¤!
ÏÂÃæÊÇÒ»¸öµ¥Ñ¡°´Å¦Ç°Ì¨²»Ë¢ÐµÄÀý×Ó.ÓкõľÍÍùÉÏÌù
<mce:script language="javascript"><!--
function SetButton()
{
if(document.all.rdoByHuman.checked==true)
{
......