aspx.net里面的变量和javascript传值?
aspx.net里面的变量和javascript传值?
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string str="xtb";
Response.Write("<script language='javascript'>alert(str);</script>");
}
}
怎么样才可以alert(str的值呢?)