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

JAVASCRIPT·ÃÎʸ¸´°¿ÚµÄ±äÁ¿»ò·½·¨


AA.HTM
-------------------------------------
<!--
showModalDialogº¯ÊýµÄʹÓà  (ת)     
±¾·¶Àý¿ÉÒÔʵÏÖµ¯³öÒ»¸öģ̬´°¿Ú£¬²¢ÑÝʾÁËÁ½ÖÖ½ÓÊպʹ«µÝ²ÎÊýµÄ·½·¨£¬Í¬Ê±¿ÉÒÔ½ÓÊÜģ̬´°¿Ú·µ»ØµÄ¶à¸ö±äÁ¿   
-->
<html>     
    
<head>     
<meta   http-equiv="Content-Type" content="text/html; charset=gb2312">     
<title>Ö÷½çÃæ</title>     
</head>     
    
<body>     
<form id="getForm"> »Ø´«Öµ£º
<input   type="text"   id="getData"   readOnly>   
<input   type="text"   id="getData1" readOnly>     
<input   type="text"   id="getData2" readOnly> 
</form>     
<input   type="button"   value="´ò¿ªÐ´°¿Ú1"   onClick="openWin1()">     
<input   type="button"   value="´ò¿ªÐ´°¿Ú2"   onClick="openWin2()">     
<script   language="JavaScript">          
function   openWin1()           
{                   
      var   srcFile   =   "BB.htm";         //д°¿ÚµÄÎĵµÃû³Æ                   
      var   winFeatures   =   "dia


Ïà¹ØÎĵµ£º

javascriptÖеÄmoveStartºÍmoveEnd·½·¨

Ïê̽TextRange¶ÔÏó--²éÕÒÓëÑ¡Ôñ
TextRange¶ÔÏóÊǶ¯Ì¬HTML(DHTML)µÄ¸ß¼¶ÌØÐÔ£¬Ê¹ÓÃËü¿ÉÒÔʵÏֺܶàºÍÎı¾ÓйصÄÈÎÎñ£¬ÀýÈçËÑË÷ºÍÑ¡ÔñÎı¾¡£Îı¾·¶Î§ÈÃÄú¿ÉÒÔÑ¡ÔñÐԵĽ«×Ö·û¡¢µ¥´ÊºÍ¾ä×Ó´ÓÎĵµÖÐÌôÑ¡³öÀ´¡£TextRange¶ÔÏóÊÇÔÚHTMLÎĵµ½«ÒªÏÔʾµÄÎı¾Á÷ÉϽ¨Á¢¿ªÊ¼ºÍ½áÊøλÖõijéÏó¶ÔÏó¡£
ÏÂÃæÊÇTextRangeµÄ³£ÓÃÊôÐÔÓë·½·¨£º
Ê ......

³£¼ûfirefox²»Ö§³ÖµÄJavaScriptÎÊÌâ

<a href="#" onclick="ChildNode(this);">aaa</a>Òª¸ÄΪ
<a href="#" onclick="ChildNode(event);">aaa</a>
ÎÞ·¨È¡µÃthis¶ÔÏó£¬ÒªÓÃÒÔÏ·½·¨À´È¡µÃ¡£
function ChildNode(e)
{
var evt = e ? e : (window.event ? window.event : null); //´Ë·½·¨ÎªÁËÔÚfirefoxÖеļæÈÝ
var node = evt.srcEl ......

javascript ÉèÖÃÃÜÂëÇ¿¶È

 <table>
<tr>
                <td style="width: 201px; height: 22px;" valign="middle" align="right">
                &n ......

Ò»¾ä»°JavaScript±íµ¥ÑéÖ¤´úÂë

±íµ¥µÄ¿Í»§¶ËjavascriptÑéÖ¤Óи÷ÖÖ¸÷ÑùµÄд·¨£¬µÇ¼ΪformµÄonsubmitʼþ»òsubmit°´Å¤Ð´Ò»¸öº¯Êý¡£¶ÔÓÚС±íµ¥£¨Ö»ÓÐÒ»Á½¸ö±íµ¥ÓòµÄ±íµ¥£©¾Í²»±ØÔÙרÃÅÔÙÓÃjavascriptдһ¸öÑéÖ¤º¯ÊýÁË£¬Ö»ÐèÒªÔÚformµÄonsubmitʼþÀï¼ÓÉÏ£º
onsubmit=”return domainname.value==”?(alert(’ÇëÊäÈëËÑË÷ÄÚÈÝ’),false ......

JavaScriptµÄÈÕÆÚ´¦Àí

var myDate = new Date();
myDate.getYear();        //»ñÈ¡µ±Ç°Äê·Ý(2λ)
myDate.getFullYear();    //»ñÈ¡ÍêÕûµÄÄê·Ý(4λ,1970-????)
myDate.getMonth();       //»ñÈ¡µ±Ç°Ô·Ý(0-11,0´ú±í1ÔÂ)
myDate.getDate();    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ