.cs给function传参的问题,求助!!
function OpenDoc(url,filename,readonly)
{
name=escape(filename);
path=url+name;
if(readonly==1)
{
document.SureOffice.Open(path,true);
document.SureOffice.SetZoomPerc(80);
document.SureOffice.ProtectDoc(1, 1, "121212");
}
else
{
document.SureOffice.Open(url+name,false);
document.SureOffice.SetZoomPerc(80);
}
}
.aspx.cs调用以上语句怎么写
Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "OpenDoc();", true);
使用以上方法时,该怎样为openDoc()传参??
------解决方案--------------------Page.ClientScript.RegisterStartupScript(this.GetType(), "js", "OpenDoc('http://www.a.com','hehe.gif',1);", true);
------解决方案--------------------ClientScript.RegisterStartupScript(this.GetType(), "2", "<script> OpenDoc("+url"+","+filename+","+readonly");</script>");
------解决方案--------------------function f()
{
var v = "a";
var s = '<%=OpenDoc("'+v+'") %>';
}