读书人

.cs给function传参的有关问题

发布时间: 2012-08-02 11:35:26 作者: rapoo

.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+'") %>';
}

读书人网 >asp.net

热点推荐