主要是将json无法识别的字符进行转义
function dotran($str) {
$str = str_replace('"','\\"',$str);
$str = str_replace("\r\n",'\\r\\n',$str);
$str = str_replace("\t",'\\t',$str);
$str = str_replace("\\",'\\',$str);
$str = str_replace("\b",'\\b',$str);
return $str;
}
这样返回的数据就可以正常显示,下面是转换后的内容:
jsontext='{"jqry":[{"id":"121","userid":"0","status":"1","filename":"","url":"333333333","title":"aaaaaaa","type":"WatchTV","seq":"1","remark":"remarktext","content":"<p>\\r\\n\\t<object classid=\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\" codebase=\\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\\"><param name=\\"quality ......
当HTML控件的id="ctl00_contentPlaceHolder_ddl_academy",name="ctl00$contentPlaceHolder$ddl_academy"时
Request.Form["ctl00$contentPlaceHolder$ddl_academy"]而不是
Request.Form["ctl00_contentPlaceHolder_ddl_academy"] ......
<html>
<frameset cols="25%,50%,25%">
<frame src="/example/html/frame_a.html">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
<noframes>
<!-- 在浏览器不支持时才显示 -->
<body>您的浏览器无法处理框架!</body>
</noframes>
</frameset>
</html> ......
<html>
<frameset cols="50%,*,25%">
<!-- 左边页面占50% 被固定住了 -->
<frame src="/example/html/frame_a.html" noresize="noresize"
/>
<frame src="/example/html/frame_b.html" />
<frame src="/example/html/frame_c.html" />
</frameset>
</html> ......
<html>
<head>
<title> </title>
<script type="text/javascript">
function rotateImage() {
imageToRotate = document.getElementById('imgRotate');
imageToRotate.style.filter= "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')";
window.setTimeout("rotate()",100);
}
var imageToRotate;
var degreeToRotate=0;
function rotate(){
var deg2radians = Math.PI * 2 / 360;
degreeToRotate++;
degreeToRotate=degreeToRotate%360;
rad = degreeToRotate * deg2radians ;
costheta = Math.cos(rad);
sintheta = Math.sin(rad);
imageToRotate.filters.item(0).M11 = costheta;
imageToRotate.filters.item(0).M12 = -sintheta;
imageToRotate.filters.item(0).M21 = sintheta;
imageToRotate.filters.item(0).M22 = costheta;
window.setTimeout("rotate()",100);
}
</script>
</hea ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '缓存图片
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '建立下载对象
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '开始获取图片,http://xxx/png这节可以改成自己要的.其它别动
XML.Send '发送下载请求
Response.AddHeader "Content-Disposition", "attachment;filename=png.png" '设置asp输出类型,不让浏览器当成html显示,现在设置成png
Response.ContentType = "image/png" '显示成png
Response.BinaryWrite XML.responseBody '输出下载好的png内容,用二进制输出
Set XML = Nothing
%>
get_png.asp输出png
<!---图片开始//-->
<!---图片id不能变,但是可以自己加上大小=属性//-->
<img src="get_png.asp" mce_src="get_png.asp" id=png_img>
<mce:script type="text/javascript"><!--
setInterval(
function ()
{
var png_asp = "get_png.asp";//png的asp文件
png_asp += "?t=" + Math.random();//加上时间才可以每次下载新的.
document.getElementBy ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '缓存图片
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '建立下载对象
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '开始获取图片,http://xxx/png这节可以改成自己要的.其它别动
XML.Send '发送下载请求
Response.AddHeader "Content-Disposition", "attachment;filename=png.png" '设置asp输出类型,不让浏览器当成html显示,现在设置成png
Response.ContentType = "image/png" '显示成png
Response.BinaryWrite XML.responseBody '输出下载好的png内容,用二进制输出
Set XML = Nothing
%>
get_png.asp输出png
<!---图片开始//-->
<!---图片id不能变,但是可以自己加上大小=属性//-->
<img src="get_png.asp" mce_src="get_png.asp" id=png_img>
<mce:script type="text/javascript"><!--
setInterval(
function ()
{
var png_asp = "get_png.asp";//png的asp文件
png_asp += "?t=" + Math.random();//加上时间才可以每次下载新的.
document.getElementBy ......