ASP.NET和JavaScript传值 传变量值: html js中 var srcUrl = <%=getUrl%>; cs类文件中 public static string getUrl = "http://www.123.com/"; 传方法值: html js中 var srcUrl = <%=getUrl()%>; cs类文件中 public static string getUrl() { return "http://www.123.com/"; } http://heisetoufa.iteye.com/