我用showmodaldialog 传了一个参数jydbh 为什么子窗口接收的时候却多了个 '' (单引号)
function openpri()
{
var jydbh = document.getElementById("txtjydbh").value;
var revalue = window.showModalDialog("print.aspx?jydbh='"+jydbh+"'","打印预览窗口","dialogHeight:530px;dialogWidth:698px;dialogTop:screen.height/2;dialogLeft:screen.width/2; edge:sunken ; center: Yes; help: No; resizable: No; status: No; scroll:yes;");
}
<asp:Button ID="btnPrint" runat="server" Text="打印" AccessKey="p" OnClientClick="openpri();" />子窗口接收代码
string txtjydbh = Request.QueryString["jydbh"];
Response.Write(txtjydbh); 'hyky10012012002'
我要的应该是hyky10012012002我还试了以下的代码
"print.aspx?jydbh='+jydbh+'"
"print.aspx?jydbh="+jydbh+"
"print.aspx?jydbh="+jydbh+
都不行啊 为何?
function openpri()
{
var jydbh = document.getElementById("txtjydbh").value;
var revalue = window.showModalDialog("print.aspx?jydbh='"+jydbh+"'","打印预览窗口","dialogHeight:530px;dialogWidth:698px;dialogTop:screen.height/2;dialogLeft:screen.width/2; edge:sunken ; center: Yes; help: No; resizable: No; status: No; scroll:yes;");
}
<asp:Button ID="btnPrint" runat="server" Text="打印" AccessKey="p" OnClientClick="openpri();" />子窗口接收代码
string txtjydbh = Request.QueryString["jydbh"];
Response.Write(txtjydbh); 'hyky10012012002'
我要的应该是hyky10012012002我还试了以下的代码
"print.aspx?jydbh='+jydbh+'"
"print.aspx?jydbh="+jydbh+"
"print.aspx?jydbh="+jydbh+
都不行啊 为何?
不知道怎么获取不到object 的 id <object id=ReYoPrint classid="clsid:CA03A5A8-9890-49BE-BA4A-8C524EB06441" codebase="ReYoPrint.cab#Version=1,0,0,0" viewasext> </object> <input type="button" id="btnPrint" value="直接打印(Alt+p)" accesskey="P" onClick="document.getElementById("ReYoPrint").Print(true)">