var winstr="<table width=\"180\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" style=\"background-color:#a9cdfe;\" rules=\"none\">";
winstr += "<tr><td align=\"center\" width=\"100%\" style=\"color:#d98282\" >请注意查看提醒</td></tr>";
winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td valign=\"top\" style=\"font-size:14px; color:#4856DA\"><a href=\"#\" onclick=\"parent.parent.location.href='../OA/PersonalOffice/CalendarArrange/ShowSingleMsg.aspx'\" >"+msgstr+"</a></td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML = winstr;
js这东西是个宝,真的是不学不行了.最近也在一些项目中有意的用一用它,真的挺不错,就是太容易出错,稍有不慎就会在浏览器中看到 "!" .
今天用window.createPopup()做了个类似于qq信息提示的小东东,却发现加上去的连接失效,搞了一中午终于搞定了. 原来要这样连接 <a href="#" onclick="parent.location.href='xxx.htm';">xxx.htm</a>
若当前页面指的是打开popup的主页面的话,可以这样:用parent得到父窗口对象,而后进行你的操作~例如
parent.document.forms[formname].域名称.value = '变更值';
http://www.netyi.net/Resource/46b461d1-c500-4413-9ef7-697469488daf.aspx
SpringFramework

浙公网安备 33010602011771号