Javascript ÖÐ ShowModalDialog µÄʹÓ÷½·¨
ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄܲÙ×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´Ö¸¶¨¶Ô»°¿òÒªÏÔʾµÄÎĵµµÄURL¡£
vArguments
¿ÉÑ¡²ÎÊý£¬ÀàÐÍ£º±äÌå¡£ÓÃÀ´Ïò¶Ô»°¿ò´«µÝ²ÎÊý¡£´«µÝµÄ²ÎÊýÀàÐͲ»ÏÞ£¬°üÀ¨Êý×éµÈ¡£¶Ô»°¿òͨ¹ýwindow.dialogArgumentsÀ´È¡µÃ´«µÝ½øÀ´µÄ²ÎÊý¡£
sFeatures
¿ÉÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´®¡£ÓÃÀ´ÃèÊö¶Ô»°¿òµÄÍâ¹ÛµÈÐÅÏ¢£¬¿ÉÒÔʹÓÃÒÔϵÄÒ»¸ö»ò¼¸¸ö£¬Ó÷ֺœ;”¸ô¿ª¡£
dialogHeight ¶Ô»°¿ò¸ß¶È£¬²»Ð¡ÓÚ£±£°£°px£¬£É£Å£´ÖÐdialogHeight ºÍ dialogWidth ĬÈϵĵ¥Î»ÊÇem£¬¶ø£É£Å£µÖÐÊÇpx£¬Îª·½±ãÆä¼û£¬ÔÚ¶¨Òåmodal·½Ê½µÄ¶Ô»°¿òʱ£¬ÓÃpx×öµ¥Î»¡£
¡¡¡¡ dialogWidth: ¶Ô»°¿ò¿í¶È¡£
¡¡¡¡ dialogLeft: ¾àÀë×ÀÃæ×óµÄ¾àÀë¡£
¡¡¡¡ dialogTop: Àë×ÀÃæÉϵľàÀë¡£
¡¡¡¡ center: {yes | no | 1 | 0 }£º´°¿ÚÊÇ·ñ¾ÓÖУ¬Ä¬ÈÏyes£¬µ«ÈÔ¿ÉÒÔÖ¸¶¨¸ß¶ÈºÍ¿í¶È¡£
¡¡¡¡ help: {yes | no | 1 | 0 }£ºÊÇ·ñÏÔʾ°ïÖú°´Å¥£¬Ä¬ÈÏyes¡£
¡¡¡¡ resizable: {yes | no | 1 | 0 } £Û£É£Å£µ£«£Ý£ºÊÇ·ñ¿É±»¸Ä±ä´óС¡£Ä¬ÈÏno¡£
¡¡¡¡ status: {yes | no | 1 | 0 } £ÛIE5+£Ý£ºÊÇ·ñÏÔʾ״̬À¸¡£Ä¬ÈÏΪyes[ Modeless]»òno [Modal]¡£
scroll:{ yes | no | 1 | 0 | on | off }£ºÖ¸Ã÷¶Ô»°¿òÊÇ·ñÏÔʾ¹ö¶¯Ìõ¡£Ä¬ÈÏΪyes¡£
²ÎÊý´«µÝ·½·¨£º
¸¸´°¿ÚÏò×Ó´°¿Ú´«µÝ²ÎÊý²ÉÓÃShowModalDialogµÄµÚ2¸ö²ÎÊý¼´¿É£¬¸¸´°¿ÚÒª»ñÈ¡×Ó´°¿Ú´«»ØµÄ²ÎÊýÔò¿Éͨ¹ýShowModalDialogº¯ÊýµÄ·µ»ØÖµ»ñÈ¡¡£
×Ó´°¿Ú»ñÈ¡¸¸´°¿Ú²ÎÊýµÄ·½·¨Îª²ÉÓÃ×Ó´°¿Úwindow¶ÔÏódialogArgumentsÊôÐÔ»ñÈ¡£¬ÀýÈ磺
var a=window.dialogArguments;
×Ó´°¿ÚÏò¸¸´°¿Ú·µ»Ø²ÎÊý²ÉÓÃwindow.returnValueÊôÐÔ£¬È磺
window.returnValue=1;
window.close();
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/qunluo/archive/2005/11/21/533727.aspx
Ïà¹ØÎĵµ£º
Introduction
This article is about passing data between VB.NET/C# WinForms and JavaScript.
Before reading further, let me warn you that this article is not about ASP.NET. Concepts covered in the article are applied to Desktop applications.
Background
I was working on a project which required dat ......
Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......
javascriptµØÖ·À¸Ð´·¨
±¾µØ¿Í»§¶ËÈ«Ñ¡checkbox.¿ÉÒÔÓÃÕâ¸öÑ¡¡£
0. Ç°ÑÔ
ËùνIEµØÖ·À¸±í´ïʽ£¬¾ÍÊÇÔÚIEµÄµØÖ·À¸ÖÐÊäÈë javascript:<´úÂë>£¬Ö´ÐÐijЩ¹¦ÄÜ£¬À´¶¯Ì¬¸Ä±äÔÓÐÒ³ÃæµÄ²ÎÊýÒԴﵽijЩĿµÄ£¬ÀýÈ翪·Å±»½ûÖ¹µÄ°´Å¥¡¢ÏÔʾԱ¾Òþ²ØµÄͼƬµÈµÈ¡£±¾ÎĽ«¾ÍIEµØÖ·À¸µÄʹÓ÷½·¨×öÒ»¸öÏêϸµÄ˵Ã÷¡£
1. ±í´ïʽµÄÊéд· ......
ÒÔÇ°ÒòΪ½Ó´¥µÄÏîÄ¿£¬Óõ½javascriptµÄµØ·½£¬±¾È˶ÔjavascriptÕâ¸ö¶«Î÷ÈÏʶ²»¹»£¬ÉõÖÁÒÔΪÊÇǰ̨³ÌÐòÔ±µÄ¹¤×÷¡£×î½ü×öµÄÏîÄ¿ÀïÃæÓõ½Á˺ܶàÕâÖֽű¾ÓïÑÔ£¬²Å·¢ÏÖÕâ¸öС¶«¶«ÊµÔÚÊǺܿɰ®£¬ËäÈ»ºÜÌÔÆø£¨²»ÊǺÜÃæÏò¶ÔÏñ£¬²»ÊǺܺõ÷ÊÔ£©£¬µ«ÊÇÖ»ÒªÊÇ×öweb¿ª·¢µÄ£¬¶¼ÄÑÃâÒª½Ó´¥µ½Ëû£¬°ÑÕ⸠......