Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ´¦Àí Ctrl+s ºÍ Tab °´¼üÏìӦʼþ

getkey ÓÃÓÚ»ñµÃ°´¼üµÄÏàÓ¦´úÂë, getevÓÃÓÚ»ñµÃÏìӦʼþ
<script>
    function getkey(e)
    {
        var key;
        if(document.all)
        {
      ......

JavaScript ¶þάÊý×éÅÅÐò

var o = ['Äã', 'da', 'Äã', 123, 'fm', 'fm', 'da', 123, 'fm', 123];
var n = [];
var s = -1;
var t = null;
o.sort();

for(var i = 0; i < o.length; i++)
{
if(o[i] != t)
{
s += 1;
n[s] = [];
}
......

JavaScriptÀï×Ö·û´®ÀàÐÍת»»³ÉÈÕÆÚÀàÐÍ


JavaScriptÀï×Ö·û´®ÀàÐÍת»»³ÉÈÕÆÚÀàÐÍ£º
Èç¹û×Ö·û´®ÖÐÓпոñ»òÊÇÆäËû·Ö¸î·û·Ö¸î£¬¿ÉÒÔÓÃsplit·½·¨ÏȲð·Ö£¬·µ»ØÒ»¸öÊý×飬ÔÙ°ÑÕâ¸öÊý×éÀïµÄÄêÔÂÈÕ×÷Ϊ²ÎÊý´«µ½new Date()ÀïÉú³ÉÈÕÆÚÀàÐÍ£»
Èç¹ýûÓÐÌØÊâ·Ö¸ô·û£¬¿ÉÒÔÓÃsubstr£¨x£¬y£©·½·¨À´È¡×Ó×Ö·û´®À´Éú³ÉÈÕÆÚ£¬substr£¨x£¬y£©Àx±íʾȡ×Ö´®µÄ¿ªÊ¼Î»Öã¬y±íʾ×Ó´®µÄ³ ......

ÓÃJavaScript¼ì²éÎļþÊÇ·ñ´æÔÚ

function checkImgAddr(url){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("post",url,false);
xmlhttp.send();
if(xmlhttp.readyState==4){
if(xmlhttp.status==404){
return "File Not Exist.";
}else if(xmlhttp.status == 200){
re ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ