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
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
function
getVerificationCode()//È¡µÃÑéÖ¤Âë
{
var
para =
new
Array(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
&nbs ......
Silverlight 3 µ÷ÓÃjavascript º¯Êý¼òµ¥Àý×Ó£º
c# code:
using System.Windows.Browser;
private void logout_but_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
HtmlPage.Wind ......
ÒÔÇ°ÒòΪ½Ó´¥µÄÏîÄ¿£¬Óõ½javascriptµÄµØ·½£¬±¾È˶ÔjavascriptÕâ¸ö¶«Î÷ÈÏʶ²»¹»£¬ÉõÖÁÒÔΪÊÇǰ̨³ÌÐòÔ±µÄ¹¤×÷¡£×î½ü×öµÄÏîÄ¿ÀïÃæÓõ½Á˺ܶàÕâÖֽű¾ÓïÑÔ£¬²Å·¢ÏÖÕâ¸öС¶«¶«ÊµÔÚÊǺܿɰ®£¬ËäÈ»ºÜÌÔÆø£¨²»ÊǺÜÃæÏò¶ÔÏñ£¬²»ÊǺܺõ÷ÊÔ£©£¬µ«ÊÇÖ»ÒªÊÇ×öweb¿ª·¢µÄ£¬¶¼ÄÑÃâÒª½Ó´¥µ½Ëû£¬°ÑÕ⸠......
CDATA ÄÚ²¿µÄËùÓж«Î÷¶¼»á±»½âÎöÆ÷ºöÂÔ¡£
¼ÙÈçÎı¾Öаüº¬ÁË´óÁ¿µÄ "<" ºÍ "&" ×Ö·û - ¾ÍÏñ±à³Ì´úÂëÖо³£³öÏÖµÄÇé¿öÒ»Ñù - ÄÇôÕâ¸ö XML ÔªËؾͿÉÒÔ±»¶¨ÒåΪһ¸ö CDATA ²¿·Ö¡£
CDATA Çø¶Î¿ªÊ¼ÓÚ "<![CDATA["£¬½áÊøÓÚ "]]>"£º
<script type="text/javascript">
<![CDATA[
function compare(a,b)
......