如何使用asp.net和html在选项单击事件中打开现有的html页面窗口 [英] how to open the existing html page window in option click event using asp.net with html

查看:78
本文介绍了如何使用asp.net和html在选项单击事件中打开现有的html页面窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<b></b>&lt;select  id="Select1" name="shortcut" class="sl"; style="margin-left:10px">
   &lt;option>&lt;/option>
     &lt;option onclick="window.open('multi_language.htm','Multi Language','width=500,height=400,left=250,top=100,screenX=100,screenY=100')">Belarusian&lt;/option>
     &lt;option onclick="window.open('multi_language.htm','Multi Language','width=500,height=400,left=250,top=100,screenX=100,screenY=100')">Bulgarian&lt;/option>
     &lt;option onclick="window.open('multi_language.htm','Multi Language','width=500,height=400,left=250,top=100,screenX=100,screenY=100')">German&lt;/option>
     &lt;option onclick="window.open('multi_language.htm','Multi Language','width=500,height=400,left=250,top=100,screenX=100,screenY=100')">English&lt;/option>


It will executed correctly in mozzila forefox.

but internet explorer it will show the error msg of invalid argument...

plz help me to solve this..

推荐答案

使用Window.Open [ HTML< option>标记 [ ^ ]

样本:
Use Window.Open[^] method to achieve it.

On option click, call this window.open client side using Javascript. If needed, look here for other events exposed: HTML <option> Tag[^]

Sample:
<option onclick="OpenWindowJavaScriptMethod()">Some Option</option>


在JS中,定义此方法并打开具有所需URL的窗口.

试试吧!


In JS, define this method and open the window having a desired URL.

Try!


这篇关于如何使用asp.net和html在选项单击事件中打开现有的html页面窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆