<script type="text/javascript">
function test(a)
{
window.opener.document.forms[0].elements['src'].value = a;
}
</script>
protected void btnUpload_Click(object sender, EventArgs e)
{
try
{
string filename = Path.GetFileName(this.fileuploadimages.PostedFile.FileName);
fileuploadimages.SaveAs(Server.MapPath("~/Images/" + filename));
ImageUrl = "~/Images/" + filename;
btnUpload.OnClientClick = string.Format("test(\'{0}\');",ImageUrl);
Response.Write("<script language="'javascript'"> {top.close() }</script>");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
我需要使用参数
调用名为test的javascript函数我正在尝试上面但是它没有工作PLZ帮助我提前感谢