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

javaScript»ñÈ¡Ò³Ã棬ÆÁÄ»µÈ¸ß¶ÈÓë¿í¶È

//»ñÈ¡Ò³ÃæÊý¾Ý
 function getPageSize(){  
   var xScroll, yScroll;  
   if (window.innerHeight && window.scrollMaxY) {  
     xScroll = document.body.scrollWidth;
     yScroll = window.innerHeight + window.scrollMaxY;
   } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
     xScroll = document.body.scrollWidth;
     yScroll = document.body.scrollHeight;
   } else{ // Explorer Macwould also work in Explorer 6 Strict, Mozilla and Safari
     xScroll = document.body.offsetWidth;
     yScroll = document.body.offsetHeight;
   }
   var windowWidth, windowHeight;
   if (self.innerHeight) {  // all except Explorer
     windowWidth = self.innerWidth;
     windowHeight = self.innerHeight;
   } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
     windowWidth = document.documentElement.clientWidth;
     windowHeight = document.documentElement.clientHeight;
   } else if (document.body) { // other Explorers
     windowWidth = document.body.clientWidth;
     windowHeight = document.body.clientHeight;
   }  
   // for small pages with total height less then height of the viewport
   if(yScroll < windowHeight){
     pageHeight = windowHeight;
   } else { 
     pageHeight = yScroll;
   }
   if(xScroll < windowWidth){  
     pageWidth = windowWidth;
   } else {
    


Ïà¹ØÎĵµ£º

Javascript ÔÚ HTML Ò³Ãæ¹â±ê´¦ÊäÈë×Ö·û

insertAtCurson º¯Êý´úÁ½²ÎÊý·Ö±ðΪ¶ÔÏóºÍÊäÈëµÄ×Ö·û
    function insertAtCursor(myField, myValue)
    { 
        if (document.selection)
        { 
         &nb ......

a±êÇ©ÖеÄhref,onclick,#,javascript:void¼òÒª·ÖÎö

<script type="text/javascript">
window.onbeforeunload=function()
{
alert("onbeforeunload event...");
//return false;
}
</script>
<a href="#" onclick="return true;">²âÊÔ1</a><br/>
<a href="javascript:void(0)" onclick="return true;">²âÊÔ2</a><br/& ......

JavaScript£ºprototypeÊôÐÔʹÓÃ˵Ã÷

prototype ÊÇÔÚ IE 4 ¼°ÆäÒÔºó°æ±¾ÒýÈëµÄÒ»¸öÕë¶ÔÓÚijһÀàµÄ¶ÔÏóµÄ·½·¨£¬¶øÇÒÌØÊâµÄµØ·½±ãÔÚÓÚ£ºËüÊÇÒ»¸ö¸øÀàµÄ¶ÔÏóÌí¼Ó·½·¨µÄ·½·¨£¡ÕâÒ»µã¿ÉÄÜÌýÆðÀ´»áÓеãÂÒ£¬±ð¼±£¬ÏÂÃæÎÒ±ãͨ¹ýʵÀý¶ÔÕâÒ»ÌØÊâµÄ·½·¨×÷ÒÑϽ²½â£º
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÒªÏÈÁ˽âÒ»ÏÂÀàµÄ¸ÅÄJavaScript ±¾ÉíÊÇÒ»ÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬ËüËùÉæ¼°µÄÔªËظù¾ÝÆäÊôÐÔµ ......

10¸ö»ùÓÚJavaScriptµÄWYSIWYG(Ëù¼û¼´ËùµÃ)±à¼­Æ÷


ÔÚÏ߱༭ÄÚÈݵÄʱºò£¬ÄÇЩ»ùÓÚ JavaScript µÄ±à¼­Æ÷°ïÁËÎÒÃÇ´ó棬ÕâЩËù¼û¼´ËùµÃ£¨WYSIWYG£©±à¼­Æ÷£¬¸øÎÒÃÇÌṩÁËÀàËÆ
Office µÄ²Ù×÷ÌåÑé¡£Èç½ñ£¬ÈκÎÍøÕ¾ÄÚÈݹÜÀíϵͳ£¨CMS£©ºÍ²©¿Íϵͳ¶¼ÐèÒªÒ»¸öÕâÑùµÄ±à¼­Æ÷¡£±¾Îľ«Ñ¡ÁË10¸ö»ùÓÚ JavaScript 
µÄ±à¼­Æ÷£¬ËüÃÇÓеÄÊÇ»ùÓÚ jQuery ¿ò¼Ü£¬ÓеãÔò²»ÊÇ¡£
Mar ......

JavaScriptʹÓü¼Çɾ«ÝÍ

(Ò»).È·ÈÏɾ³ýÓ÷¨:
  1. BtnDel.Attributes.Add("onclick","return confirm('"+"È·ÈÏɾ³ý?"+"')");
  2. linktempDelete.Attributes["onclick"]="javascript:return  confirm('"+"È·ÈÏɾ³ý?"+"');";
  3. privat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ