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

javascript ѧϰ±Ê¼Ç£¨6£©

1. window ¶ÔÏóÊÇÕû¸ö BOM µÄºËÐÄ,ËùÓжÔÏóºÍ¼¯ºÏ¶¼ÒÔijÖÖ·½Ê½»Ø½Óµ½ window ¶ÔÏó.
          window ¶ÔÏó±íʾÕû¸öä¯ÀÀÆ÷´°¿Ú,µ«²»±íʾÆäÖаüº¬µÄÄÚÈÝ.
2. ¿ª·¢Õß¿ÉÒÔʹÓà window ¶ÔÏóÒƶ¯ºÍµ÷Õûä¯ÀÀÆ÷´°¿ÚµÄ±íÏÖÐÎʽ.
    window.moveBy(dx,dy); //Ïà¶Ôµ±Ç°Î»ÖÃ,ˮƽÒƶ¯dx¸öÏñËØ,´¹Ö±Òƶ¯dy¸öÏñËØ
window.moveTo(x,y); //Òƶ¯µ½(x,y)λÖÃ
window.resizeBy(dw,dh); //Ïà¶Ôµ±Ç°´óС¸Ä±ä(dx,dy)
window.resizeTo(w,h); //´°¿Ú´óСµ÷ÕûΪ(x,y) 
3.  ¿ÉÒÔÓà window.open() ·½·¨´ò¿ªÐ´°¿Ú.ʹÓà window.close() ¹Ø±Õд°¿Ú.
    window.open("http://www.xxx.com","anyFrame","height=550,width=12,top=23,left=222,resizable") 
4. д°¿Ú»¹ÓжԴò¿ªËüµÄ´°¿ÚµÄÒýÓÃ,´æ·ÅÔÚopenerÊôÐÔÖÐ,Ö»ÔÚд°¿ÚµÄ×î¸ß²ã window ¶ÔÏó²ÅÓÐ opener ÊôÐÔ.
    var test = window.open("http://www.xxx.com","anyFrame","height=550,width=12,top=23,left=222,resizable");
alert(test.opener == window); //outputs "true" 
5. ¿ÉÒÔʹÓà window ¶ÔÏóµÄ3Öз½·¨µ¯³öÐÅÏ¢.alert(),confirm(),prompt().
    alert():Ö»ÏÔʾOK°´Å¥
    confirm():ÏÔʾOK°´Å¥ºÍcancel°´Å¥
    prompt():ÏÔʾOK°´Å¥ºÍcancel°´Å¥,»¹ÓÐÎı¾¿ò.
6. ¿ÉÒÔͨ¹ý window.status ºÍ window.defaultStatus ÕâÁ½¸öÊôÐÔÖµÉèÖô°¿Ú״̬À¸ÐÅÏ¢.
    status ÊôÐÔ¿ÉÒÔÁÙʱ¸Ä±ä״̬À¸ÐÅÏ¢
    defaultStatus ÊôÐÔ¿ÉÒÔÔÚÓû§À뿪´°¿Úǰʹ״̬À¸Ò»Ö±ÏÔʾ¸ÃÎı¾
        window.defaultStatus = "hello world!";
or
<a href="#" mce_href="#" onmouseover="window.status='hello world'">hello world</a> 
7. ¿ÉÒÔʹÓà window ¶ÔÏóµÄ history ÊôÐÔ¼°Æä·½·¨·ÃÎÊä¯ÀÀÆ÷´°¿ÚµÄÀúÊ·.
     //ºóÍËÒ»Ò³
window.history.go(-1);
//or
window.history.back();
//Ç°½øÒ»Ò³
window.history.go(1);
//or
window.history.forward();
//²é¿´ÀúÊ·Ò³ÃæÊý,ÕâÑù¿ÉÒÔÖªµÀ¿ÉÒÔÇ°½ø»òÕߺóÍ˶àÉÙÒ³
window.history.length 


Ïà¹ØÎĵµ£º

javascript ʵÏÖÊý¾Ý±í¸ñÏÔʾµÄÕ¹¿ªÓëÕÛµþ

<script   language="javascript">  
  function   ShowTableRow(id)
 
  { 
  var _Row = document.getElementById(id)   <!-- »ñÈ¡IDΪTableRowID µÄ¶ÔÏó -->
  var _Img = document.getElementById("Img"+id)
 
&nb ......

css,javascriptµÄÔ¤¼ÓÔØ

css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬ ......

javascriptµ÷Óúǫ́µÄÌí¡¢É¾¡¢¸Ä¡¢²é

ǰ̨£º
<%@ Page AutoEventWireup="true" CodeBehind="CustomerBizList.aspx.cs" Inherits="SSMIS.UI.MISUI.CustomerBizList"
    Language="C#" MasterPageFile="/Master/WebAdmin.master" %>
<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="bcr">
    ......

JavaScriptÄÚÖöÔÏóÊôÐÔ¼°·½·¨

1.Date
ÊôÐÔ(1):
constructor      Ëù½¨Á¢¶ÔÏóµÄº¯Êý²Î¿¼
prototype       Äܹ»Îª¶ÔÏó¼ÓÈëµÄÊôÐԺͷ½·¨
·½·¨(43):
getDay()        ·µ»ØÒ»ÖÜÖеĵڼ¸Ìì(0-6)
getYear()       ·µ»ØÄ ......

javascript ÕýÔò


1 javascript ÕýÔò
¶ÔÏó´´½¨ ºÍÓ÷¨
ÉùÃ÷javascript ÕýÔò
±í´ïʽ
¸´ÖÆ´úÂë
´úÂëÈçÏÂ:

var reCat = new RegExp("cat");
ÄãÒ²¿ÉÒÔ
var reCat = /cat/; //Perl ·ç¸ñ £¨ÍƼö£©

2 ѧϰ×î³£ÓÃµÄ test exec match search replace split 6¸ö·½·¨
1£© test ¼ì²éÖ¸¶¨µÄ×Ö·û´®ÊÇ·ñ´æÔÚ
¸´ÖÆ´úÂë
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ