62,046
社区成员
发帖
与我相关
我的任务
分享
.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$(function(){
$("#para").text("YYY");
//alert($("#para").val());
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<label id="para" runat="Server">XXX</label>
</div>
</form>
</body>
</html>
<%=LoadJs %>
.cs
public string LoadJs = "";
protected void Page_Load(object sender, EventArgs e)
{
LoadJs = "<script>alert('"+para.InnerHtml+"')</script>";
}
<html>
<head>
<title></title>
<script src="jquery-1.3.2.min.js" ></script>
<script>
$(function(){
$("#label_id").text("XXXXXXX");
})
</script>
</head>
<body>
<label id="label_id" ></label>
</body>
</html>