function DownloadImage() {
var imagepath= $("input[id$=hdn_Downloadpath]").val()
<% Dim filePath As String = ConfigurationManager.AppSettings("Convention_IagesPath") & "images/"%> + imagepath.ToString()
<% Response.ContentType = "image/jpg"%>
<% Response.AddHeader("Content-Disposition", "attachment;filename=""" & filePath & """")%>
<% Response.TransmitFile(filePath)%>
<% Response.End()%>
}
我如何在 java 脚本中调用 vb 代码。还有一个问题是当页面被调用时,这段代码也会执行,因此它会产生错误