摘要: public class MessageBox { public static void showBox(System.Web.UI.Page page, string script) { page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script type='text/javascript'>" + script + "</script>"); } } 阅读全文
posted @ 2012-10-09 11:06 loklook123 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 一、基本用法window.open(pageURL,name,parameters)其中:pageURL为子窗口路径name为子窗口句柄parameters为窗口参数(各参数用逗号分隔)实例:window.open('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no')二、关闭窗口,并刷新父窗口function CloseWindow(){ 阅读全文
posted @ 2012-10-09 10:57 loklook123 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 一、用法:window.showModalDialog(url,args,'dialogWidth=650px;scroll=no;dialogHeight=250px;status=no; ');二、关闭子窗口,并刷新父窗口想在showModalDialog打开的窗口中提交表单且不打开新窗口只需在打开的页面的<head>中加入<base target="_self">在<form>中不写target属性或target属性为空如果想刷新父窗口,还要在body标签中加入以下属性: onbeforeunload="d 阅读全文
posted @ 2012-10-09 10:39 loklook123 阅读(166) 评论(0) 推荐(0) 编辑