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";
}