{"id":778,"date":"2012-09-27T10:52:35","date_gmt":"2012-09-27T02:52:35","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=778"},"modified":"2012-09-27T10:52:35","modified_gmt":"2012-09-27T02:52:35","slug":"innerhtml-ie678%e6%94%af%e6%8c%81-%e7%81%ab%e7%8b%90%e5%92%8c%e8%b0%b7%e6%ad%8c%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%8d%e6%94%af%e6%8c%81","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/778","title":{"rendered":"innerHTML IE6,7,8\u652f\u6301 \u706b\u72d0\u548c\u8c37\u6b4c\u6d4f\u89c8\u5668\u4e0d\u652f\u6301"},"content":{"rendered":"

<!DOCTYPE HTML PUBLIC “-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN”>
\n<HTML>
\n\u00a0<HEAD>
\n\u00a0 <TITLE> New Document <\/TITLE>
\n\u00a0 <META NAME=”Generator” CONTENT=”EditPlus”>
\n\u00a0 <META NAME=”Author” CONTENT=””>
\n\u00a0 <META NAME=”Keywords” CONTENT=””>
\n\u00a0 <META NAME=”Description” CONTENT=””>
\n\u00a0<\/HEAD><\/p>\n

\u00a0<BODY>
\n\u00a0<div id=”test”>
\n\u00a0\u00a0text:<input id=”a” type=”text” value=”\u539f\u6765”\/><br>
\n\u00a0\u00a0hidden:<input id=”b” type=”hidden” value=”hidden”\/>
\n\u00a0<\/div><\/p>\n

\u00a0<br><br>
\n\u00a0<input type=”button” value=”\u70b9\u51fb” onclick=”f()”\/>
\n\u00a0<script language=”javascript”>
\n\u00a0\u00a0function f(){
\n\u00a0\u00a0\u00a0document.getElementById(“a”).value=”\u6539\u53d8”;\/\/\u8fd9\u53e5\u5728innerHTML\u7684\u65f6\u5019(IE\u6709\u6548 \u706b\u72d0\u8c37\u6b4c\u65e0\u6548)
\n\u00a0\u00a0\u00a0document.getElementById(“b”).value=”\u6539\u53d8”;\/\/\u8fd9\u53e5\u5728innerHTML\u7684\u65f6\u5019(IE\u6709\u6548 \u706b\u72d0\u8c37\u6b4c\u6709\u6548)\u00a0 \u5f88\u5947\u602a\u636e\u8bf4\u662f\u706b\u72d0\u7684bug\u00a0 \u96be\u9053\u8c37\u6b4c\u4e5f\u6709\u8fd9\u6837\u7684bug\uff1f\uff1f\uff1f
\n\u00a0\u00a0\u00a0alert(document.getElementById(‘test’).innerHTML);
\n\u00a0\u00a0}
\n\u00a0\u00a0\/\/\u89e3\u51b3\u65b9\u6cd5 document.getElementById(“a”).setAttribute(“value”,”\u6539\u53d8”);\/\/\u6b64\u53e5\u5728\u4e0a\u8ff0\u4e09\u79cd\u6d4f\u89c8\u5668\u5747\u6709\u6548
\n\u00a0<\/script>
\n\u00a0<\/BODY>
\n<\/HTML>
\ninnerHTML\u5bf9\u7528jQuery\u91cc\u9762\u7684html()\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u5728\u7528jQuery\u7684\u65f6\u5019\u53d1\u73b0\u8fd9\u4e2a\u00a0 \u56f0\u6270\u4e86\u4e00\u6bb5\u65f6\u95f4\u00a0 \u4ee5\u4f5c\u7b14\u8bb0\uff01<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

<!DOCTYPE HTML PUBLIC “-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN”> <HTML> \u00a0<HEAD> \u00a0 <TITLE> New Document <\/TITLE> \u00a0 <META NAME=”Generator” CONTENT=”EditPlus”> \u00a0 <META NAME=”Author” CONTENT=””> \u00a0 <MET<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,9],"tags":[133],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/778"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=778"}],"version-history":[{"count":2,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/778\/revisions"}],"predecessor-version":[{"id":780,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/778\/revisions\/780"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=778"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}