查看文章 |
后台C#调用js脚本
2008-06-05 15:22
string scriptstr = "\n window.parent.document.getElementById('upload').style.display='none'"; scriptstr = scriptstr + "\n window.parent.document.getElementById('uploadinfo').style.display='block'"; scriptstr = scriptstr + "\n window.parent.document.getElementById('show_upload').value='重新上传'"; Page.ClientScript.RegisterStartupScript(this.GetType(), "OnInitControl", "<script language='JavaScript'type='text/javascript'>" + scriptstr + "\n</script>"); this.GetType()//必传的参数,为本页面的类型。 OnInitControl://起的名字。 scriptstr:在js中的方法。 |
最近读者: