JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ
ÔÎÄ£ºÁõÎä|JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ
ÖÚËùÖÜÖªwindow.open() º¯Êý¿ÉÒÔÓÃÀ´´ò¿ªÒ»¸öд°¿Ú£¬ÄÇôÈçºÎÔÚ×Ó´°ÌåÖÐÏò¸¸´°Ì崫ֵĨ£¬Æäʵͨ¹ýwindow.opener¼´¿É»ñÈ¡¸¸´°ÌåµÄÒýÓá£
ÈçÎÒÃÇн¨´°ÌåFatherPage.htm:
XML-Code:
<script type="text/javascript">
function OpenChildWindow()
{
window.open('ChildPage.htm');
}
</script>
<input type="text" id="txtInput" />
<input type="button" value="OpenChild" onclick="OpenChildWindow()" />
È»ºóÔÚChildPage.htmÖм´¿Éͨ¹ýwindow.openerÀ´·ÃÎʸ¸´°ÌåÖеÄÔªËØ£º
XML-Code:
<script type="text/javascript">
function SetValue()
{
window.opener.document.getElementById('txtInput').value
=document.getElementById('txtInput').value;
window.close();
}
</script>
<input type="text" id="txtInput" />
<input type="button" value="SetFather" onclick="SetValue()" />
ÆäʵÔÚ´ò¿ª×Ó´°ÌåµÄͬʱ£¬ÎÒÃÇÒ²¿ÉÒÔ¶Ô×Ó´°ÌåµÄÔªËØ½øÐи³Öµ£¬ÒòΪwindow.openº¯ÊýͬÑù»á·µ»ØÒ»¸ö×Ó´°ÌåµÄÒýÓã¬Òò´ËFatherPage.htm¿ÉÒÔÐÞ¸ÄΪ£º
XML-Code:
<script type="text/javascript">
function OpenChildWindow()
{
var child = window.open('ChildPage.htm');
child.document.getElementById('txtInput').value
=document.getElementById('txtInput').value;
}
</script>
<input type="text" id="txtInput" />
<input type="button" value="OpenChild" onclick="OpenChildWindow()" />
ͨ¹ýÅжÏ×Ó´°ÌåµÄÒýÓÃÊÇ·ñΪ¿Õ£¬ÎÒÃÇ»¹¿ÉÒÔ¿ØÖÆÊ¹ÆäÖ»ÄÜ´ò¿ªÒ»¸ö×Ó´°Ì壺
XML-Code:
<script type="text/javascript">
var child
function OpenChildWindow()
{
if(!child)
child = window.open('ChildPage.htm');
child.document.getElementById('txtInput').value
Ïà¹ØÎĵµ£º
ͨ¹ýÇëÇóµÄheaderÖпÉÒÔ¿´µ½ User-Agent Ïî
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0; CIBA)
ÕâÀï¼Ç¼Á˱¾µØÐÅÏ¢£¬Í¨¹ýÕâÀïµÄ.Net CLR xxxxx£¬¿ÉÒÔÅÐ¶Ï ......
ÏÈ¿´Ð§¹û£¬ºÏ²¢Ç°£º
ºÏ²¢ºó£º
ʵÏÖÔ´Â룺
// ******************************
//¹¦ÄÜ£ºÓû§ºÏ²¢GridViewÏàͬµÄÐÐ(ǰ̨ÏÔʾµÄʱºòºÏ²¢)
//ʱ¼ä£º2009/08/12 14:59
//×÷ÕߣºYzy
// ******************************
//²ÎÊý˵Ã÷£ºstrGridId—Êý¾Ý¿Ø¼þÃû³Æ£»arrIndexCol—²»Çå³þ£»arrMergeCol—ÒªºÏ²¢µÄÁ ......
innerTextÊÇieµÄ˽ÓÐÊôÐÔ£¬firefoxµÄÀàËÆÊôÐÔΪtextContent£¬Èç¹ûÔÚÍøÒ³ÖÐʹÓÃinnerTextµÄ»°£¬ÐèÒªÓÃÒ»¸öÌõ¼þÅжÏÀ´²é¿´ä¯ÀÀÆ÷Ö§³ÖÄÄÖÖÊôÐÔ¡£ÕâÀïÎÒÃÇ¿ÉÒÔΪfirefox¶¨ÒåÒ»¸öinnerTextʹµÃÔÚÕýÎÄ´úÂëÖÐÖ»ÐèÒªÓÃinnerText¶ø·ÇÒ»¸öº¯Êý£¬¿Éʹ´úÂë±äµÃ¸üÖ±¹Û¼ò½à¡£
var lBrowser = {};
lBrowser.agt = navigator.userAgent.t ......
ÔÚUpdatepanelÖÐʹÓÃJAVASCRIPTµÄÎÊÌâ
ÔÚUpdatePanle×ÜʹÓÃjavascriptÈ磺Response.Write("<script language='javascript'>alert('" + error.Message.ToString() + "');history.back(-1);</script>"); ʱ£¬µ¯³öÀ´Ò»¸öÌáʾ¶Ô»°¿ò
Sys.WebForms.PageRequestManagerParserErrorException:
The message ......