web页面前后台变量交互

例如,改变页面的title

1
                   <script language =javascript >

                            window.document.title =tl;

                   </script>

.cs中:

              string s="123456";

              Response.Write("<script language=javascript>var tl='"+ s +"'</script>");

 

2

                   <title><%=s%></title>

.cs中:

         public string s="123456";

3
                <title><%=Method()%></title>

.cs中:

         public string Method()

         {

              return "123456";

         }

posted @ 2007-01-09 11:16  '.Elvis.'  阅读(246)  评论(0编辑  收藏  举报