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;
 
Ïà¹ØÎĵµ£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ëæ»ú ......
ûÕÒµ½vs2008½«JavaScriptÅÅ°æµÃºÃ¿´Ð©µÄ°ì·¨£¬µ«ÓÐÕâ¸ö¹¤¾ß
http://jsbeautifier.org/
ÕâÊÇÀÏÍâµÄÒ»¸öÔÚÏßÅÅ°æJavaScriptµÄ·þÎñ¡£
ÎÒ²»Ï²»¶ÏÂÔØ°²×°Ò»Ð©²»Ì«”Õý“µÄÈí¼þ¹¤¾ß¡£
==
˳±ãÔÞÒ»ÏÂCSDN²©¿ÍµÄ"ÔÝ´æÏä"¹¦ÄÜ¡£
µ«ÔÚÎÒ·¢ÁË”ADSL80¶Ë¿Ú“Ò»ÎÄ£¬ÔÚ½ÓÏÂÀ´µÄÊ®À´·ÖÖÓÁË£¬Ð޸IJ»ÁË£¬Ò²²»ÄÜ ......
<body>
<form id="form1" runat="server">
ÇëÑ¡ÔñÄãµÄ°®ºÃ£º
<div>
<input name="Che" type="checkbox" />×ãÇò
& ......
¡¡¡¡
¡¡¡¡»ù±¾²½Öè
¡¡¡¡1£¬°ÑÐèÒªÅÅÐòµÄÐзŵ½tbodyÖУ¨³ÌÐò»áÖ±½ÓÈ¡tbodyµÄrows£©£»
¡¡¡¡2£¬°ÑÅÅÐòÐзŵ½Ò»¸öÊý×éÖУ»
¡¡¡¡this.Rows = Map(this.tBody.rows, function(o){ return o; });
¡¡¡¡3£¬°´ÐèÇó¶ÔÊý×é½øÐÐÅÅÐò£¨ÓÃÊý×éµÄsort·½·¨£©£»
¡¡¡¡this.Rows.sort(Bind(this, this.Compare, orders, 0));
¡¡¡¡4£¬Ó ......
<script language="javascript">
<!--
String.prototype.replaceAll = stringReplaceAll;
function stringReplaceAll(AFindText,ARepText){
raRegExp = new RegExp(AFindText,"g");
return this.replace(raRegExp,ARepText)
}
var content = "%sfasf%sfd%asdfsadf%1111%"
// °Ñ ËùÓÐµÄ % Ì滻Ϊ #
......