如何打开一个窗口铬和ie [英] how to open a window both chrome and ie

查看:58
本文介绍了如何打开一个窗口铬和ie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Window.showmodaldialog正在打开但是没有打开chrome。如何使用chrome也。为此帮助我。我在下面使用的代码。



代码: -

隐藏复制代码

函数PrintItem(ID,BID) {



window.showModalDialog('./ ProductSalesBill.aspx?Req = N&SID ='+ ID +'&BID ='+ BID,self,'dialogWidth:800px; dialogHeight:530px; status:no; dialogHide:yes; unadorned:no;');

}



这里我打电话给这个打印项目如下所示代码在gridview中: -

a href ='<%#String.Format(javascript:PrintItem({0},'{1}'),Eval(Billno ),Eval(BranchCode))%>



以上href标签位于网格视图中。



在这里我想打开两个浏览器亲切地帮助这个感谢提前。

hi to all,
Window.showmodaldialog is opening in ie but no open in chrome . how to work with chrome also.kindly help me for this. below code i used.

code:-
Hide Copy Code
function PrintItem(ID, BID) {

window.showModalDialog('./ProductSalesBill.aspx?Req=N&SID=' + ID + '&BID=' + BID, self, 'dialogWidth:800px;dialogHeight:530px;status:no;dialogHide:yes;unadorned:no;');
}

here i call this print item like this below code is in gridview:-
a href='<%#String.Format("javascript:PrintItem({0}, '{1}')", Eval("Billno"), Eval("BranchCode")) %>

above href tag is in grid view.

here i want to open both browser Kindly help for this thanks in advance.

推荐答案

不要使用 showModalDialog();这不是标准功能;并且不要使用 window.open - 在大多数情况下,弹出窗口是丑陋的,侵入性的,并且会被许多用户通过适当的浏览器插件阻止。



更好地使用jQuery和所谓的模态弹出技术,它只模仿同一页面上的模态行为。它使UI非常整洁,适用于单页面应用程序。请参阅: https://jqueryui.com/dialog [ ^ ]。



此外,还有许多具有不同视觉效果的第三方插件,例如过渡,尤其是调光 http://bfy.tw/Vdm [ ^ ]。



如果你需要学习jQuery(强烈推荐),请参阅:

http://en.wikipedia.org/wiki/ JQuery

http://jquery.com

< a href =http://learn.jquery.com/> http://learn.jquery.com ,

http://learn.jquery.com/using-jquery-core

http://learn.jquery.com/about-jquery/how-jquery-works (从这里开始)...



-SA
Don't use showModalDialog(); this is not a standard function; and don't use window.open — in most cases, popups are ugly, intrusive, and will be blocked by many users through appropriate browsers' plug-ins.

Better use the jQuery with so-called modal popup technique which only mimic modal behavior on the same page. It makes UI really neat and is suitable for single-page applications. Please see: https://jqueryui.com/dialog[^].

Also, there are many 3-rd party plug-ins featuring different visual effects, such as transitions and, notably, dimming: http://bfy.tw/Vdm[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery,
http://jquery.com,
http://learn.jquery.com,
http://learn.jquery.com/using-jquery-core,
http://learn.jquery.com/about-jquery/how-jquery-works (start from here)…

—SA


使用它将工作的jquery对话框所有浏览器和最好的东西都可以轻松定制,如果需要,可以添加多个动画......



示例代码



<!doctype html>

< html>

< head>

< title> jQuery UI对话< / title>

< script src =http://code.jquery.com/jquery-2.1.4.js>< / script>

< link rel =stylesheethref =http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css>

< script src =http://code.jquery.com/ui/1.8.24/jquery-ui.js>< / script>

<风格>

。中心{

持仓:固定;

剩余:50%;

最高:50% ;

}

< / style>

< / head>

< body>



< div>

< a id =testc lass =centerhref =#>链接文字< / a>

< / div>



< div id =dialogtitle =基本对话框style =display:none>

< p>这是用于显示信息的默认对话框。可以使用x图标移动,调整大小和关闭对话框窗口。< / p>

< / div>



< script>
Use jquery dialog box it will work on all browsers and best things its easy customisable and if needed multiples animations can be added to it...

Sample Code

<!doctype html>
<html>
<head>
<title>jQuery UI Dialog</title>
<script src="http://code.jquery.com/jquery-2.1.4.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.8.24/jquery-ui.js"></script>
<style>
.center{
position:fixed;
left: 50%;
top: 50%;
}
</style>
</head>
<body>

<div>
<a id="test" class="center" href="#">link text</a>
</div>

<div id="dialog" title="Basic dialog" style="display: none">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>

<script>


(#test)。on('click',function(){
("#test").on('click', function () {


这篇关于如何打开一个窗口铬和ie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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