javascript»ñÈ¡ä¯ÀÀÆ÷µÄ¿í¶ÈºÍ¸ß¶È
<script language="JavaScript" type="text/JavaScript">
<!--
function displayScreenSize()
{
var bodyWidth =document.body.clientWidth; //ÍøÒ³¿É¼ûÇøÓò¿í
var bodyHeight =document.body.clientHeight; //ÍøÒ³¿É¼ûÇøÓò¸ß
var bodyWidthWithBorder =document.body.offsetWidth; //ÍøÒ³¿É¼ûÇøÓò¿í(°üÀ¨±ßÏߵĿí)
var bodyHeightWithBorder=document.body.offsetHeight; //ÍøÒ³¿É¼ûÇøÓò¸ß(°üÀ¨±ßÏߵĿí)
var bodyWidthWithScroll =document.body.scrollWidth; //ÍøÒ³ÕýÎÄÈ«ÎÄ¿í
var bodyHeightWithScroll=document.body.scrollHeight; //ÍøÒ³ÕýÎÄÈ«Îĸß
var bodyTopHeight =document.body.scrollTop; //ÍøÒ³±»¾íÈ¥µÄÉϱ߾à
var bodyLeftWidth =document.body.scrollLeft; //ÍøÒ³±»¾íÈ¥µÄ×ó±ß¾à
Ïà¹ØÎĵµ£º
/*
* JavaScript¶ÔÏó¾ÍÊÇÒ»×éÊôÐÔ£¨·½·¨£©µÄ¼¯ºÏ
* ÔÚ¸ÃÓïÑÔÖÐÈç¹û±äÁ¿Ãû»ò·½·¨Ãû²»·ûºÏÉùÃ÷¹æ·¶£¬
* ÔòÒ»¶¨µÃÓ÷½À¨ºÅ“ [] ”ÒýÓÃËü
*
*/
/**
* <1.>¸ÃÓï¾äÉùÃ÷ÁËÒ»¸öclass1À࣬class1Ï൱ÓÚ¹¹Ôì·½·¨£¬Óֽй¹ÔìÆ÷
* Ò²¿É˵ÉùÃ÷ÁËÒ»¸öclass1·½·¨
......
shift£ºÉ¾³ýÔÊý×éµÚÒ»Ï²¢·µ»ØÉ¾³ýÔªËØµÄÖµ£»Èç¹ûÊý×éΪ¿ÕÔò·µ»Øundefined
var a = [1,2,3,4,5];
var b = a.shift(); //a£º[2,3,4,5] b£º1
unshift£º½«²ÎÊýÌí¼Óµ½ÔÊý×鿪ͷ£¬²¢·µ»ØÊý×éµÄ³¤¶È
var a = [1,2,3,4,5];
var b = a.unshift(-2,-1); //a£º[-2,-1,1,2,3,4,5] b£º7
×¢£ºÔÚIE6.0ϲ ......
Ô´´ÓÚ2007Äê12ÔÂ16ÈÕ£¬2009Äê10ÔÂ15ÈÕÇ¨ÒÆÖÁ´Ë¡£
JavaScriptͨ¹ýÄÚÖõÄsetTimeoutº¯ÊýÀ´Íê³ÉÒ³ÃæÄڵĶ¨Ê±¼ì²é£¬Ò²ÊǺܾÃÒÔǰдµÄ¶«Î÷ÁË¡£
Ö®ËùÒÔÏëÆðËüÀ´£¬ÊÇÒòΪÔÚºÍÏîÄ¿×éÆäËû³ÉԱ˵¸ÃÊÂÇéµÄʱºò£¬±ðÈ˾¹È»³°Ð¦ÎÒ˵ÊÇÉϸöÊÀ¼ÍµÄ´úÂ룬ÏÖÔÚ¶¼ÓÃWEB2.0ÁË¡£
<script language="JavaScript" type="text ......
Ô´´ÓÚ2007Äê12ÔÂ16ÈÕ£¬2009Äê10ÔÂ15ÈÕÇ¨ÒÆÖÁ´Ë¡£
°¦£¬ºÜ¾ÃÒÔǰдµÄ´úÂ룬ɹһɹ£¬¹À¼Æ×Ô¼º¿´¶¼¿´²»¶®ÁË£¬:(
var head="display:''"
img_close=new Image()
img_close.src="/sysManage/images/f.gif"
img_open=new Image()
img_open.src="/sysManage/images/fo.gif"
img3=new Image( ......
replace()×î¼òµ¥µÄËãÊÇÄÜÁ¦¾ÍÊǼòµ¥µÄ×Ö·ûÌæ»»¡£
ʾÀý´úÂëÈçÏ£º
<script language="javascript">
var strM = "javascript is a good script language";
//ÔÚ´ËÎÒÏ뽫×ÖĸaÌæ»»³É×ÖĸA
alert(strM.replace("a","A"));
</script>
ËüÖ»Ìæ»»ÁËÊ××Öĸ¡£µ«Èç ......