一,后台方法: protected string CsharpVoid(string strCC) { return strCC; } javascript 调用 <script   language="javascript">    var s = "<%=CsharpVoid("www.esoutong.com")%>";      document.write(s); </script>

二,

1.后代码: protected void CsharpVoid()      {          string strCC = "www.esoutong.com";          Response.Write(strCC);      }
2.调用方法:CsharpVoid() <script   language="javascript"> document.write("<%CsharpVoid();%>"); </script>

三,

把需要调用的函数写在服务器控件里,然后在javascript中加入<img src="/Images/OutliningIndicators/None.gif" align=top>document.getElementById("你控件ID").click();

posted on 2012-03-20 12:45  Asa.Zhu  阅读(381)  评论(0编辑  收藏  举报