JavaScriptÒ³ÃæË¢ÐÂÓ뵯³ö´°¿ÚÎÊÌâ½â¾ö·½·¨
JavaScriptÒ³ÃæË¢ÐÂÓ뵯³ö´°¿ÚÎÊÌâ½â¾ö·½·¨
1.ÎÞÌáʾˢÐÂÍøÒ³
´ó¼ÒÓÐûÓз¢ÏÖ£¬ÓÐÐ©ÍøÒ³£¬Ë¢ÐµÄʱºò£¬»áµ¯³öÒ»¸öÌáʾ´°¿Ú£¬µã“È·¶¨”²Å»áˢС£
¶øÓеÄÒ³Ãæ²»»áÌáʾ£¬²»µ¯³öÌáʾ´°¿Ú£¬Ö±½Ó¾ÍË¢ÐÂÁË.
Èç¹ûÒ³ÃæÃ»ÓÐform£¬Ôò²»»áµ¯³öÌáʾ´°¿Ú¡£Èç¹ûÒ³ÃæÓÐform±íµ¥£¬
a)< form method="post" ...> »áµ¯³öÌáʾ´°¿Ú
b)< form method="get" ...> ²»»áµ¯³ö
2.javascriptË¢ÐÂÒ³ÃæµÄ·½·¨
window.location.reload();
ʹÓÃwindow.open()µ¯³öµÄµ¯³ö´°¿Ú£¬Ë¢Ð¸¸´°¿Ú
window.opener.location.reload()
ʹÓÃwindow.showDialogµ¯³öµÄģʽ´°¿Ú
window.dialogArguments.location.reload();
3.Javascriptµ¯³ö´°¿Ú´úÂë
ÏÂÃæ¸øÁ½¸öµ¯³öÆÁÄ»¾ÓÖд°¿ÚµÄÀý×Ó
window.open()·½Ê½
function ShowDialog(url) {
var iWidth=300; //´°¿Ú¿í¶È
var iHeight=200;//´°¿Ú¸ß¶È
var iTop=(window.screen.height-iHeight)/2;
var iLeft=(window.screen.width-iWidth)/2;
window.open(
url,"Detail","Scrollbars=no,Toolbar=no,Location=no,Direction=no,Resizeable=no,
Width="+iWidth+" ,Height="+iHeight+",top="+iTop+",left="+iLeft
);
}
window.showModalDialog·½Ê½
function ShowDialog(url) {
var iWidth=300; //´°¿Ú¿í¶È
var iHeight=200;//´°¿Ú¸ß¶È
var iTop=(window.screen.height-iHeight)/2;
 
Ïà¹ØÎĵµ£º
£±.ÈÕÆÚ¶ÔÏóµÄ¹¹Ôì
1.1µ±Ç°ÈÕÆÚ
var now = new Date();
1.2ÌØ¶¨ÈÕÆÚ
var someDate = new Date(yyyy,mm,dd);
×¢£ºÔÂÓ¦¸ÃÊÇ´Ó£°¿ªÊ¼¼ÆÊýµÄ.
2. ÈÕÆÚº¯ÊýµÄʹÓÿÉÒÔ²ÎÕÕÏÂÃæµÄÁ´½Ó. http://www.w3schoo ......
ÔÚ¿ª·¢Öо³£»áÓÐÖ±½Ó¹Ø±ÕÒ³Ãæ²»µ¯³öÈκÎÌáʾµÄÐèÇó£¬ÔÚIE6ÖпÉÒÔÖ±½ÓÏóÏÂÃæÕâÑùд¾Í¿ÉÒÔÁË
<mce:script language=javascript><!--
window.opener=null
window.close()
// --></mce:script>
Õâ¸öÎÊÌâÔÚIE7ÖÐÔòÓпÉÄÜÊdzöÓÚijÖÖ°²È«¿¼ÂÇ£¨ÒòΪÔÚMSä¯ÀÀÆ÷µÄ¾ºÕù¶ÔÊÖFFÖУ¬ÊDz»Äܹرշ ......
<script language="javascript">
String.prototype.gblen = function() {
var len = 0;
for (var i=0; i<this.length; i++) {
if (this.charCodeAt(i)>127 || this.charCodeAt(i) ......
옃주
<div id=demo style="overflow:hidden; width:128px; height:300px;">
<div id=demo1>
<img src="/gfjs.gif"><br><img src="/bxtt.gif"><br><img src="/bzjd.gif"><br>
<img src="/gfjs.gif"><br><img src="/bxtt.gif"><br><img ......
Ê×ÏÈ£¬ÔÚ¸÷¸öä¯ÀÀÆ÷ÖУ¬¶Ïµãµ÷ÊÔÖ§³ÖµÄ×îºÃµÄµ±È»ÊÇFirefox£¬Firefox²»½ö¿ÉÒÔʹÓÃFirebugµ÷ÊÔÒ³Ãæjs½Å±¾£¬»¹¿ÉÒÔÓø߼¶µ÷ÊÔ¹¤¾ßÀýÈçJavaScript Debugger (Venkman) À´µ÷ÊÔFirefoxÀ©Õ¹ÀïµÄjs¡£³ý´ËÖ®Í⣬Firefox»¹Ö§³ÖһЩ¸üΪ¸ß¼¶µÄ¶Ïµãµ÷ÊÔ¡¢±äÁ¿¼àÊÓ¹¦ÄÜ¡£
ÆäËûä¯ÀÀÆ÷ÀOpera¡¢ChromeºÍSafariµÄµ÷ÊÔ¹¦ÄÜÒ²±È½ÏºÃÓᣠ......