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

9.22 CSS¸´ºÏÊôÐÔºÍJavaScriptÔÚHtmlÒ³ÃæÖеÄÖ´ÐÐ˳Ðò

CSS¸´ºÏЧ¹û
CSSµÄЧ¹ûÊÇ¿ÉÒÔÖصþµÄ£¬ÀýÈçclass="a b"£¬ÄÇôÕâ¸ö½Úµã¾ÍͬʱӵÓÐÁËaºÍbµÄÊôÐÔ£¬²¢ÇÒ£¬b¿ÉÒÔ¸²¸ÇaµÄÊôÐÔ¡£
JavaScriptÔÚHtmlÖеÄÖ´ÐÐ˳Ðò
¾­¹ý¼òµ¥²âÊÔ£¬·¢ÏÖJavaScriptµÄÖ´ÐÐ˳ÐòÊÇ°´ÕÕjsµÄ¼ÓÔØ˳Ðò½øÐеģ¬¶øonloadº¯ÊýÊÇÔÚÕû¸öÒ³Ãæ¼ÓÔØÍê³Éºó²Å¿ªÊ¼Ö´ÐС£
ÎҵIJâÊÔÎļþ£º
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<mce:script language="javascript" type="text/javascript"><!--
alert("JS in the Header!");
function loadon(){
alert("onload!")
}

// --></mce:script>
</head>
<body onload="loadon()">
TODO write content
<mce:script language="javascript" type="text/javascript"><!--
alert("Before the </body>");


// --></mce:script>
</body>
</html>
 
Ö´Ðнá¹û£º
 
 
ÓÉ´Ë¿ÉÒÔ¿´³ö£º
headerÖеÄjs´úÂëÏȼÓÔØ£¬Òò´ËÒ²ÏÈÖ´ÐÐ
bodyÖеÄÆä´Î¼ÓÔØ
onloadÊÇÔÚbodyÍêÈ«¼ÓÔؽáÊøÖ®ºó²Å¼ÓÔØ£¬Òò´ËÊÇÔÚbodyÖеÄjsÖ´ÐÐÖ®ºó²ÅÖ´ÐÐ


Ïà¹ØÎĵµ£º

JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ

Ô­ÎÄ£ºÁõÎä|JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ  
ÖÚËùÖÜÖªwindow.open() º¯Êý¿ÉÒÔÓÃÀ´´ò¿ªÒ»¸öд°¿Ú£¬ÄÇôÈçºÎÔÚ×Ó´°ÌåÖÐÏò¸¸´°Ìå´«ÖµÄØ£¬Æäʵͨ¹ýwindow.opener¼´¿É»ñÈ¡¸¸´°ÌåµÄÒýÓá£
ÈçÎÒÃÇн¨´°ÌåFatherPage.htm:
XML-Code:
<script type="text/javascript">
function OpenChildWindow()
{ ......

Javascript±Õ°ü£¨Closure£©

±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......

IEºÍFirefoxÔÚJavaScriptÓ¦ÓÃÖеļæÈÝÐÔ

1.document.formName.item("itemName") ÎÊÌâ
˵ Ã÷:IEÏÂ,¿ÉÒÔʹÓÃdocument.formName.item("itemName")»òdocument.formName.elements ["elementName"];FirefoxÏÂ,Ö»ÄÜʹÓÃdocument.formName.elements["elementName"].
½â¾ö·½·¨:ͳһʹÓÃdocument.formName.elements["elementName"].
2.¼¯ºÏÀà¶ÔÏóÎÊÌâ
˵Ã÷:IEÏÂ,¿ÉÒÔ ......

½â¾öFirefox ÏÂF5ºÍIEÏÂF5 ²»Ò»ÖµÄjavascript ½Å±¾.

½â¾öFirefox ÏÂF5ºÍIEÏÂF5 ²»Ò»ÖµÄjavascript ½Å±¾.
var check=function(e)
 {
  e=e||window.event;
  //alert(e.which||e.keyCode);
  if((e.which||e.keyCode)==116)
  {
   if(e.preventDefault)
   { e.preventDefault();}
&nb ......

javascript»ù´¡ÖªÊ¶¡¾×îÏ꾡¡¿

1 ´´½¨½Å±¾¿é
1: <script language=”JavaScript”>
2: JavaScript code goes here
3: </script> 
2 Òþ²Ø½Å±¾´úÂë
1: <script language=”JavaScript”>
2: <!--
3: document.write(&ldquo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ