62,266
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=str %>
</div>
</form>
</body>
</html>
public string str = "";
protected void Page_Load(object sender, EventArgs e)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.AppendLine("<script language='javascript'>");
sb.AppendLine("var str=\"<h4 style=\\\"color:Green;\\\">已经成功收藏! </h4> <p> <a href=\\\"Personal/Manage.aspx\\\">查看收藏夹 </a> </p>\"");
sb.AppendLine("document.write(str)");
sb.AppendLine("</script>");
str = sb.ToString();
}
<div class="open6_cont text2">
<%=strMsgSuccess%>
</div>
$(document.body).ready(function()
{
var strMsgSuccess = "";
if (data = "success") {
strMsgSuccess = "<h4 style=\"color:Green;\">已经成功收藏!</h4><p><a href=\"Personal/Manage.aspx\">查看收藏夹</a></p>";
}
else {
strMsgSuccess = "<h4 style=\"color:Red;\">对不起,您没有登录或注册!</h4>";
}
});
string jsArray = @" imgArray = new Array();
imgArray.push('http://photo.100du.com/store_album/10/1d/3e/23380_100.jpg');
imgArray.push('http://photo.100du.com/store_album/fe/c9/eb/23379_100.jpg');
imgArray.push('http://photo.100du.com/store_album/02/26/aa/23378_100.jpg');
imgArray.push('http://photo.100du.com/store_album/dd/e5/af/23377_100.jpg');
imgArray.push('http://photo.100du.com/store_album/0e/ad/71/23376_100.jpg');
imgArray.push('http://photo.100du.com/store_album/43/51/43/23397_100.jpg');
imgArray.push('http://photo.100du.com/store_album/22/9b/98/23396_100.jpg');
imgArray.push('http://photo.100du.com/store_album/64/1e/0c/23395_100.jpg');
imgArray.push('http://photo.100du.com/store_album/e8/36/b5/23394_100.jpg');
imgArray.push('http://photo.100du.com/store_album/3c/79/e6/23393_100.jpg');
imgArray.push('http://photo.100du.com/store_album/c0/f3/a9/23383_100.jpg');
imgArray.push('http://photo.100du.com/store_album/d5/a1/46/23382_100.jpg');
imgArray.push('http://photo.100du.com/store_album/eb/72/d0/23381_100.jpg');
";
ClientScript.RegisterClientScriptBlock(GetType(), "setArray", jsArray, true);
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript">
var str = "<%=str %>";
document.write(str);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
public string str = "";
protected void Page_Load(object sender, EventArgs e)
{
str="<h4 style=\\\"color:Green;\\\">已经成功收藏! </h4> <p> <a href=\\\"Personal/Manage.aspx\\\">查看收藏夹 </a> </p>";
}
<div class="open6_cont text2">
<%=strMsgSuccess%>
</div>
function(data) {
var strMsgSuccess = {};
if (data = "success") {
strMsgSuccess = new String("<h4 style=\"color:Green;\">已经成功收藏!</h4><p><a href=\"Personal/Manage.aspx\">查看收藏夹</a></p>");
}
else {
strMsgSuccess = new String("<h4 style=\"color:Red;\">对不起,您没有登录或注册!</h4>");
}