javascript ¸¸´°¿Ú ×Ó´°¿Ú
¸¸´°¿ÚÖÐÓÐÈýÖÖ·½Ê½´ò¿ª×Ó´°¿Ú£º
1£º
window.open(URL,windowName,parameters);
2:
alert(""); //µ¯³öÐÅÏ¢Ìáʾ¶Ô»°¿ò
confirm(""); //µ¯³öÐÅϢȷÈ϶Ի°¿ò
prompt(""); //¾ßÓн»»¥ÐÔÖʵĶԻ°¿ò
3:
//´´½¨Ä£Ì¬Äã¶Ô»°¿ò
window.showModalDialog(sURL,vArguments,sFeatures)
//´´½¨·Çģ̬¶Ô»°¿ò
window.showModelessDialog(sURL,vArguments,sFeatures)
¸¸´°¿ÚÓë×Ó´°¿ÚµÄÖµ´«µÝ:
ÔÚ×Ó´°¿ÚÖÐͨ¹ý£ºwindow.dialogArguments»ñµÃ¸¸´°¿ÚÖеÄÖµ£¬
ͨ¹ýwindow.returnValueÈ¥´«Öµ¸ø¸¸´°¿Ú¡£
//ͨ¹ý×Ó´°¿ÚÌá½»¸¸´°¿ÚÖÐµÄ±íµ¥£ºform1,Ìá½»ºóÖ´Ðвéѯ²Ù×÷
var parent=window.dialogArguments;
parent.document.form1.action="QueryInfor.jsp";
parent.submit();
ÔÚ¸¸´°¿ÚÖУº
parasent.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<script type="text/javascript">
function showDialog(){
var obj = new Object();
obj.name="hah";
var a = window.showModalDialog("child.html",window,"");
alert("×Ó´°¿ÚµÄÖµ£º"+a);
}
function o(){
alert("nihao");
}
</script>
<BODY>
<input type="text" id="name" /><br/>
<input type="button" onclick="showDialog()" value="µã»÷">
</BODY>
</HTML>
ÔÚ×Ó´°¿ÚÖУº
child.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<script type="text/javascript">
function o(){
var v = window.dialogArguments;
alert("ÖµÊÇ£º"+v.name);
window.returnValue="http://www.i5tt.com";
Ïà¹ØÎĵµ£º
°æȨÉùÃ÷£ºÔ´´×÷Æ·£¬ÔÊÐíתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ Ôʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://gzycm520.blog.51cto.com/175220/36822
· ʼþÔ´¶ÔÏó event.srcElement.tagName event.srcElement.type
· ²¶»ñÊÍ·Å event.srcElement.setCapture(); ......
//1.Àà
function Test(id)
{
this.id=id;
this.method=function()
{
//´úÂë
};
}
......
JavaScript ¿ò¼Ü±È½Ï
ÏÔÖøÔöÇ¿ JavaScript ¿ª·¢µÄ¿ò¼Ü¸ÅÀÀ
Joe Lennon, Èí¼þ¿ª·¢ÈËÔ±, ×ÔÓÉÖ°ÒµÕß
¼ò½é£º ÏÖ´ú Web Õ¾µãºÍ Web Ó¦ÓóÌÐòÇãÏòÓÚÒÀÀµ´óÁ¿¿Í»§¶Ë JavaScript À´Ìṩ·á¸»µÄ½»»¥¹¦ÄÜ£¬ÓÈÆäÊÇÒì²½ HTTP ÇëÇóµÄ³öÏÖʹµÃ²»Ë¢ÐÂÒ³Ãæ¾Í¿ÉÒÔ´Ó·þÎñÆ÷¶Ë½Å±¾»òÊý¾Ý¿âϵͳ·µ»ØÊý¾Ý»òÏìÓ¦¡£ÔÚ±¾ÎÄÖУ¬Äú½«Á˽âÈçº ......