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

JavaScript»ñÈ¡¿É¼ûÒ³ÃæÖÐÐÄλÖÃ

css»ñÈ¡Ò³ÃæÖÐÐÄλÖÃ
.fixed
{
FONT-SIZE: 30pt;
color : #1A6841;
left:expression(eval(document.body.clientWidth)/2-150);
top:expression(eval(document.body.clientHeight)/2-25);
width:300px;
height:50px;
border:green 1px solid;
background:#99CCFF;
+position:absolute;
+left:expression(eval(document.body.scrollLeft)+eval(document.body.clientWidth)/2-150);
+top:expression(eval(document.body.scrollTop)+eval(document.body.clientHeight)/2-25);
}
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.offsetWidth (°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.offsetHeight (°üÀ¨±ßÏߵĿí)
ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£ºdocument.body.scrollWidth
ÍøÒ³ÕýÎÄÈ«Îĸߣºdocument.body.scrollHeight
ÍøÒ³±»¾íÈ¥µÄ¸ß£ºdocument.body.scrollTop
ÍøÒ³±»¾íÈ¥µÄ×ó£ºdocument.body.scrollLeft
ÍøÒ³ÕýÎIJ¿·ÖÉÏ£ºwindow.screenTop
ÍøÒ³ÕýÎIJ¿·Ö×ó£ºwindow.screenLeft
ÆÁÄ»·Ö±æÂʵĸߣºwindow.screen.height
ÆÁÄ»·Ö±æÂÊµÄ¿í£ºwindow.screen.width
ÆÁÄ»¿ÉÓù¤×÷Çø¸ß¶È£ºwindow.screen.availHeight
ÆÁÄ»¿ÉÓù¤×÷Çø¿í¶È£ºwindow.screen.availWidth
ͨÓöÔÁªÊµÏÖ£¬DivÔڵײ¿¸¡¶¯
<table width="1003" border="0" cellspacing="0" cellpadding="0" align="center" id="maple1">
<tr>
    <td align="center" height="30" bgcolor="#999999">¸¡¶¯ÄÚÈÝŶ</td>
</tr>
</table>
<script type="text/javascript" src="Maple_Couplet.Js"></script>
<script type="text/javascript">
window.onload = function(){
   n=window.screen.height; //ÆÁÄ»µÄ·Ö±æÂÊ
   m=window.screenTop;   //ÍøÒ³ÄÚÈݾàÆÁÄ»¶¥²¿µÄ¾àÀë ¼´ IE°´Å¥£¬µØÖ·À¸µÈµÄ¸ß¶È
   myBottom=n-m-30-50; //n-m-ÏÔʾDivµÄ¸ß-µ×²¿×´Ì¬À¸ºÍÈÎÎñÀ¸µÄ¸ßÔ¼50
   //aa.innerHTML=m;
        new couplet("maple1",myBottom,40);
}
</script>
<SCRIPT language="JavaScript" type="text/javascript">
function openmu() {
     //var left = screen.width;
 &


Ïà¹ØÎĵµ£º

ÓÃJavaScript¸Ä½øÄãµÄÍøÒ³¿ò¼Ü

ÓÐÁ½ÖÖÍøÒ³Éè¼ÆÕߣºÏ²»¶Óÿò¼Ü(Frame)µÄºÍ²»Ï²»¶µÄ¡£²»Ï²»¶Ê¹Óÿò¼ÜµÄÈËÃÇ×ÜÊDZ§Ô¹Ëµ£¬¿ò¼ÜʹµÃÒ³Ãæ±äµÃ¸´ÔÓ£¬Ôö¼ÓÁËÏÂÔظºµ££¬¶øÇÒ»á¼õÉÙÄãµÄÒ³Ãæ±»ËÑË÷ÒýÇæÕÒµ½µÄ»ú»á¡£¶øϲ»¶¿ò¼ÜµÄÉè¼ÆÕßÔò˵¿ò¼Üʹä¯ÀÀ±äµÃ¼òµ¥£¬²¢¸³ÓèÉè¼ÆÈËÔ±ÔÚ°²ÅÅÒ³ÃæÉϸü¶àµÄ¿ØÖÆ¡£
¡¡¡¡²»¹ÜÄãÊÇÔÞ³ÉʹÓÿò¼Ü»¹ÊÇ·´¶Ô£¬ÊÂʵÉÏ£¬´ø¿ò¼ÜµÄÒ³ÃæÒ»Ö±´ ......

href="#"Óëhref="javascript:void(0)"µÄÇø±ð

ÎÒÏëʹÓùýajaxµÄ¶¼³£¼ûÕâÑùµÄ´úÂ룺
<a href="javascript:doTest2();void(0);">here</a>
µ«Õâ¶ùµÄvoid(0)¾¿¾¹ÊǺκ¬ÒåÄØ£¿
JavascriptÖÐvoidÊÇÒ»¸ö²Ù×÷·û£¬¸Ã²Ù×÷·ûÖ¸¶¨Òª¼ÆËãÒ»¸ö±í´ïʽµ«ÊDz»·µ»ØÖµ¡£
void ²Ù×÷·ûÓ÷¨¸ñʽÈçÏ£º
1. javascript:void (expression)
2. javascript:void expression
expr ......

JavaScript·½·¨ºÍ¼¼ÇÉ´óÈ«


JavaScript·½·¨ºÍ¼¼ÇÉ´óÈ«  »ù´¡ÖªÊ¶
1 ´´½¨½Å±¾¿é  <script language=”JavaScript”> JavaScript code goes here </script>
2 Òþ²Ø½Å±¾´úÂë  <script language=”JavaScript”><!-- document.write(“Hello”); --> </script>
ÔÚ²»Ö§³Ö ......

¡¶JavaScript Õ÷;¡· ¶Áºó¸Ð

ÎÒÊÇÒ»Ãû³ÌÐòÔ±£¬Ê¹ÓÃJavaÓïÑÔ½øÐйÜÀíÈí¼þ¿ª·¢¹¤×÷¡£ÓÐÒ»´Î¿ª·¢ÏîÄ¿ÖÐʹÓÃJavaScriptÀ´·á¸»Óû§ÌåÑéЧ¹û£¬ÌصØÈÏÕæµÄѧϰÁËһϣ¬´Ó´Ë¶ÔJavaScript²úÉúÁËŨºñµÄÐËȤ¡£Óлú»á²Î¼ÓÁËÓɵç×Ó¹¤Òµ³ö°æÉç·É˼¹«Ë¾¾Ù°ìµÄ¡¶JavaScriptÕ÷;¡·¶Áºó¸ÐÓн±ÕÙ¼¯»î¶¯£¬»ñµÃÔùÊéѧϰ¡£ÓÉÓÚ±¾ÈËÎÄѧˮƽÓÐÏÞ£¬´Ë¶Áºó¸ÐµÄÓôʲ»µ±Ö®´¦»¹Íû¶à ......

ÔÚJavaScriptÖÐʵÏÖ¸ßЧµÄStringBuffer

JavaScriptÖеÄStringÊÇÖ»¶ÁµÄ£¬ËùÒÔÿ´Î¶ÔString±äÁ¿µÄ²Ù×÷¶¼»áÔÚÄÚ´æÖвúÉúÒ»¸öÁãʱ±äÁ¿£¬Èç¹ûÒª¶Ô×Ö·û´®½øÐдóÁ¿µÄÖظ´²Ù×÷£¬ÐÔÄܺÍЧÂʶ¼»áºÜµÍÏ£¬Òò´Ë³£ÓÃÊý×éµÄ·½·¨²Ù×÷×Ö·û´®£¬¼´ÏÈ°Ñ×Ö·û´®¶¼´æ´¢ÔÚÊý×éÖУ¬È»ºóʹÓÃjoin()·½·¨Á¬½Ó×Ö·û´®¡£
µ±È»¿ÉÒÔ°ÑÕâÖÖ·½·¨ÔÙÑݱäһϣ¬ÔÚJavaScriptÖÐÄ£ÄâStringBufferÀà¡£
¿´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ