cs中如何调用javascript
想在cs中使用js语言,试了一下这段代码
protected void Page_Load(object sender, EventArgs e)
{
string ttt = "ttt";
string js = "<script type='text/javascript'>";
js += "function istwo(m){alert(m);} </script>";
ClientScript.RegisterStartupScript(GetType(), "registerJS", js);
ClientScript.RegisterStartupScript(GetType(), "runJS", "istwo(" + ttt + ")");
}
运行后页面上显示了istwo(ttt),并没有弹出警告框,请问问题出在什么地方了? javascript
[解决办法]