且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

新视窗开启

更新时间:2022-06-21 23:30:03

这里有一个示例链接,说明如何使用javascript打开弹出窗口.

http://www.javascript-coder.com/window-popup/javascript-window- open.phtml [^ ]

在我看来,***创建一个javascript函数
Here a link with examples of how to open a popup using javascript.

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml[^]

It seems to me it would be best to create a javascript function
function openItem(url, p1)
{
   window.open (url +"?param=" + p1, "Item: " + p1);
   return false;
}



并以如下方式使用它:



And use it somewhat like:

NavigateUrl="javascript:openItem(''<%# Eval("Url") %>'', ''<%#Eval(Param1)%'');">



祝您好运!



Good luck!


如果您想单击按钮控件,请使用以下功能.

onclick ="return openpopup(this.id);"

然后将脚本添加到设计页面的顶部.

< script type ="text/javascript" src ="../Scripts/saction.js"></script>


然后将该函数写入.js文件以获取以下代码..


if u want to click the button control use the below function.

onclick="return openpopup(this.id);"

then include the script to top of design page.

<script type="text/javascript" src="../Scripts/saction.js"></script>


then write the function to .js file for below code..


function openpopup(id) {
    window.open("/Application/Transaction.aspx", "List", "scrollbars=no,resizable=no,width=400,height=420");
    return false;
}



它将正常运行..



it will run properly..


只需将
Target ="_new"

添加到超链接