ASP.net的客户端脚本
// 在</form>标签之前
this.RegisterStartupScript("2", "<script>alert(2)</script>");
//在<form>标签之后
this.RegisterClientScriptBlock("1", "<script>alert(1)</script>");
//创建客户端数组在</form>之前
RegisterArrayDeclaration("FavoriteFolks", "'Goodspeed'");
RegisterArrayDeclaration("FavoriteFolks", "'wang'");
//创建隐藏input
RegisterHiddenField("foo", "bar");
this.RegisterStartupScript("2", "<script>alert(2)</script>");
//在<form>标签之后
this.RegisterClientScriptBlock("1", "<script>alert(1)</script>");
//创建客户端数组在</form>之前
RegisterArrayDeclaration("FavoriteFolks", "'Goodspeed'");
RegisterArrayDeclaration("FavoriteFolks", "'wang'");
//创建隐藏input
RegisterHiddenField("foo", "bar");
posted on 2004-09-21 12:27 Goodspeed 阅读(1588) 评论(1) 编辑 收藏 举报