js實現彈窗

     strSucc += "<br/><font color=\"red\">提醒您!在預設狀態下,Google Chrome 會阻止彈出式視窗自動在畫面上顯示。</font>";
strSucc += "<br/><font color=\"red\">請記得將彈出式視窗的設定調整為允許,謝謝</font>";
strSucc += "<br/><font color=\"red\">設定方式可上網參考chrome瀏覽器彈出式視窗設定步驟</font>"; String strAlertMess = "$('#light').remove();$('#fade').remove();var dialog = art.dialog({ title: '提示信息',content: '" + strSucc + "',icon: 'succeed',drag: false,resize: false, lock: true,dblclick_hide: false,ok: function () { var element =document.getElementById('ToolBarSaveButton_01'); if(element ==null){var element =document.getElementById('ToolBarSaveButton_02');} element.click(); } ,close:function () { $('#hideClickType').val('0')} });"; ScriptManager.RegisterStartupScript(this, GetType(), "", strAlertMess,true);

代碼中的 <font color=\"red\">添加轉苡符號,因為content 后接的是'' color ='red'會對他有影響。

String strPage = "$('#light').remove();$('#fade').remove();try_to_open_app('" + strUrlTemp + "');";//也可以將裡面的方法寫在前臺,作為方法調用。

  strJs = "<script language=javascript>";
strJs += "var origin = artDialog.open.origin;";
strJs += "var returnValue ='" + strProp_InsKind + "';";
strJs += "var input=origin.document.getElementById('hideProp_No1');";
strJs += "input.value=returnValue; ";
strJs += "origin.document.getElementById('btnHideT').click();";
strJs += " art.dialog.close();";
strJs += "</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "Closed", strJs);

Page.ClientScript.RegisterStartupScript(this.GetType(), "Closed", strJs)的使用

頁面跳轉

function OpenWindow() {
art.dialog.open("AFN-0201-12.aspx", { id: 'agent_dialog', lock: true, width: 470, height: 300, title: '', drag: false, resize: false, style: "overflower:auto", opacity: 0, close: function () { } }, false);
return false;
}
  父:var ret = showModalDialog("BFN-0205-1.aspx?k=0&&ran=" + Math.random(), "商品代號", "dialogWidth:800px;dialogHeight:530px;center:yes;help:no;resizable:no;status:no");
if (ret != null && ret != undefined && ret != "") {
                    $("#txtMascontract2").val(ret);
                }
                else {
                    return false;
                }
子: window.returnValue = $(this).attr("innerHTML").replace(/^\s*|\s*$/g, "");
window.close();
谷歌瀏覽器 
父 :var ret = window.open("BFN-0205-1.aspx?k=0&&ran=" + Math.random(), '商品代號', "height=520,width=800,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
子 :window.opener.document.getElementById("txtMascontract2").value = $(this).attr("innerHTML").trim();
window.close();
上一篇:Nginx 减少磁盘读写次数


下一篇:20145306 《网络攻防》 MSF基础应用