{"id":528,"date":"2008-09-06T00:00:00","date_gmt":"2008-09-05T16:00:00","guid":{"rendered":"http:\/\/www.strongd.net\/?p=528"},"modified":"2011-07-15T09:17:10","modified_gmt":"2011-07-15T01:17:10","slug":"%e5%9f%ba%e4%ba%8eoo%e7%9a%84%e5%8f%af%e7%a7%bb%e5%8a%a8div%e7%aa%97%e5%8f%a3%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=528","title":{"rendered":"\u57fa\u4e8eOO\u7684\u53ef\u79fb\u52a8DIV\u7a97\u53e3\u3002"},"content":{"rendered":"<p><DIV>\u3000\u3000\u9879\u76ee\u9700\u8981\u4e00\u4e2a\u53ef\u79fb\u52a8\u7684DIV\u7a97\u53e3\uff0c\u8981\u6c42\u8c03\u7528\u7b80\u5355\uff0c\u53ef\u4ee5\u91cd\u7528\u3002\u672c\u4eba\u9a6c\u4e0a\u5c31\u8003\u8651\u5230\u4f7f\u7528OO\u4e86\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>&nbsp;<\/DIV><br \/>\n<DIV>&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;<BR>&lt;HTML&gt;<BR>&nbsp;&lt;HEAD&gt;<BR>&nbsp; &lt;TITLE&gt; New Document &lt;\/TITLE&gt;<BR>&nbsp; &lt;META NAME=&#8221;Generator&#8221; CONTENT=&#8221;EditPlus&#8221;&gt;<BR>&nbsp; &lt;META NAME=&#8221;Author&#8221; CONTENT=&#8221;&#8221;&gt;<BR>&nbsp; &lt;META NAME=&#8221;Keywords&#8221; CONTENT=&#8221;&#8221;&gt;<BR>&nbsp; &lt;META NAME=&#8221;Description&#8221; CONTENT=&#8221;&#8221;&gt;<BR>&nbsp;&lt;\/HEAD&gt;<\/DIV><br \/>\n<DIV>&nbsp;&lt;BODY&gt;<BR>&lt;SCRIPT LANGUAGE=&#8221;JavaScript&#8221;&gt;<BR>&nbsp; &lt;!&#8211;<BR>var ie=document.all;<BR>var nn6=document.getElementById&amp;&amp;!document.all;<BR>var isdrag=false;<BR>var y,x;<BR>var oDragObj;<BR>var qtD = document;<BR>function $(id){<BR>&nbsp;return getObj(id);<BR>}<BR>function getObj(id){<BR>&nbsp;return qtD.getElementById(id);<BR>}<BR>function cleanDiv(obj){<BR>(typeof(obj)==&#8221;string&#8221;?$(obj):obj).innerHTML=&#8221;;<BR>}<\/DIV><br \/>\n<DIV>function msgWindow(msgContext){<\/DIV><br \/>\n<DIV>&nbsp;this.width=400;<BR>&nbsp;this.height=300;<BR>&nbsp;this.title = &#8221;;<BR>&nbsp;this.content = &#8221;;<BR>&nbsp;this.context = (typeof(msgContext)==&#8221;string&#8221;?$(msgContext):msgContext);<\/DIV><br \/>\n<DIV>&nbsp;this.popup = function(){<BR>&nbsp;&nbsp;var left = (screen.width &#8211; this.width) \/ 2;<BR>&nbsp;&nbsp;var top = (screen.height &#8211; this.height) \/ 2 -20;<BR>&nbsp;&nbsp;this.context.innerHTML ='&lt;div id=&#8221;msgwin&#8221; style=&#8221;position:absolute;left:&#8217;+left+&#8217;px;top:&#8217;+top+&#8217;px;width:&#8217;+this.width+&#8217;px; height:&#8217;+this.height+&#8217;px; border:#999999 1pt solid; background-color:#F7F7F7&#8243;&gt;&#8217;+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8216;&lt;div id=&#8221;title_0&#8243; style=&#8221;width:100%; height:30px; background-image:url(<A href=\"http:\/\/www.1363.cn\/images\/bg_title.gif);&quot;>&#8216;&#8221;>http:\/\/www.1363.cn\/images\/bg_title.gif);&#8221;&gt;&#8217;<\/A>+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8216;&lt;div id=&#8221;title_1&#8243; style=&#8221;width:90%;text-align:left;float:left;overflow: hidden;cursor:hand;&#8221;&gt;&lt;font style=&#8221;margin-left:10px;font-weight:bold; line-height:30px; color:#0066CC; font-size:14px; &#8220;&gt;&#8217;+this.title+'&lt;\/font&gt;&lt;\/div&gt;&#8217;+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8216;&lt;div id=&#8221;btn&#8221; style=&#8221;width:10%; text-align:center;float: left;&#8221;&gt;&lt;img src=&#8221;<A href=\"http:\/\/www.1363.cn\/images\/btn_close.gif\">http:\/\/www.1363.cn\/images\/btn_close.gif<\/A>&#8221; onclick=&#8221;javascript:cleanDiv(\\&#8217;context\\&#8217;)&#8221; style=&#8221;cursor:hand; margin-top:6px;&#8221;\/&gt;&lt;\/div&gt;&lt;\/div&gt;&#8217;+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8216;&lt;div id=&#8221;txt&#8221;&nbsp; style=&#8221;width:95%; height:90%; text-align:left;overflow: hidden; padding-left:10px;line-height:24px; color:#333333; font-size:12px; &#8220;&gt;&#8217;+this.content+'&lt;\/div&gt;&lt;\/div&gt;&#8217;;<BR>&nbsp;&nbsp;document.onmousedown=initDrag;<BR>&nbsp;&nbsp;document.onmouseup=new Function(&#8220;isdrag=false&#8221;);<BR>&nbsp;}<BR>}<\/DIV><br \/>\n<DIV>function moveMouse(e) {<BR>&nbsp;if (isdrag) {<BR>&nbsp;&nbsp;oDragObj.style.top&nbsp; =&nbsp; (nn6 ? nTY + e.clientY &#8211; y : nTY + event.clientY &#8211; y)+&#8221;px&#8221;;<BR>&nbsp;&nbsp;oDragObj.style.left&nbsp; =&nbsp; (nn6 ? nTX + e.clientX &#8211; x : nTX + event.clientX &#8211; x)+&#8221;px&#8221;;<BR>&nbsp;&nbsp;return false;<BR>&nbsp;}<BR>}<\/DIV><br \/>\n<DIV>function initDrag(e) {<BR>&nbsp;var oDragHandle = nn6 ? e.target : event.srcElement;<BR>&nbsp;if(oDragHandle.tagName!=&#8217;DIV&#8217; || oDragHandle.id==&#8217;txt&#8217;)return;<BR>&nbsp;var topElement = &#8220;HTML&#8221;;<BR>&nbsp;while (oDragHandle.tagName != topElement &amp;&amp; oDragHandle.id != &#8220;msgwin&#8221;) {<BR>&nbsp;&nbsp;oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement;<BR>&nbsp;}<BR>&nbsp;if (oDragHandle.id==&#8221;msgwin&#8221;) {<BR>&nbsp;&nbsp;isdrag = true;<BR>&nbsp;&nbsp;oDragObj = oDragHandle;<BR>&nbsp;&nbsp;nTY = parseInt(oDragObj.style.top+0);<BR>&nbsp;&nbsp;y = nn6 ? e.clientY : event.clientY;<BR>&nbsp;&nbsp;nTX = parseInt(oDragObj.style.left+0);<BR>&nbsp;&nbsp;x = nn6 ? e.clientX : event.clientX;<BR>&nbsp;&nbsp;document.onmousemove=moveMouse;<BR>&nbsp;&nbsp;return false;<BR>&nbsp;}<BR>}<\/DIV><br \/>\n<DIV><BR>function testNotes(member_id,truename){<BR>&nbsp;msg = new msgWindow(&#8216;context&#8217;);<BR>&nbsp;msg.title=&#8221;\u63d0\u793a\u7a97\u53e3&#8221;;<BR>&nbsp;msg.content =&#8217;\u3000\u3000\u6b22\u8fce\u5149\u4e34\u672c\u7ad9\u3002&#8217;;<BR>&nbsp;msg.popup();<BR>}<BR>&nbsp; \/\/&#8211;&gt;<BR>&nbsp; &lt;\/SCRIPT&gt;&nbsp; <BR>&nbsp; &lt;div id=&#8217;context&#8217;&gt;&lt;\/div&gt;<\/DIV><br \/>\n<DIV>&nbsp; &lt;SCRIPT LANGUAGE=&#8221;JavaScript&#8221;&gt;<BR>&nbsp; &lt;!&#8211;<BR>&nbsp;<BR>testNotes(1,&#8217;aa&#8217;);<BR>&nbsp; \/\/&#8211;&gt;<BR>&nbsp; &lt;\/SCRIPT&gt;<BR>&nbsp;&lt;\/BODY&gt;<BR>&lt;\/HTML&gt;<BR><\/DIV><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u3000\u9879\u76ee\u9700\u8981\u4e00\u4e2a\u53ef\u79fb\u52a8\u7684DIV\u7a97\u53e3\uff0c\u8981\u6c42\u8c03\u7528\u7b80\u5355\uff0c\u53ef\u4ee5\u91cd\u7528\u3002\u672c\u4eba\u9a6c\u4e0a\u5c31\u8003\u8651\u5230\u4f7f\u7528OO\u4e86\u3002\u4ee3\u7801\u5982\u4e0b\uff1a &nbsp; &nbsp; &lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;&lt;HTML&gt;&nbsp;&lt;HEAD&gt;&nbsp; &lt;TITLE&gt; New Document &lt;\/TITLE&gt;&nbsp; &lt;META NAME=&#8221;Generator&#8221; CONTENT=&#8221;EditPlus&#8221;&gt;&nbsp; &lt;META NAME=&#8221;Author&#8221; CONTENT=&#8221;&#8221;&gt;&nbsp; &lt;META NAME=&#8221;Keywords&#8221; CONTENT=&#8221;&#8221;&gt;&nbsp; &lt;META NAME=&#8221;Description&#8221; CONTENT=&#8221;&#8221;&gt;&nbsp;&lt;\/HEAD&gt; &nbsp;&lt;BODY&gt;&lt;SCRIPT LANGUAGE=&#8221;JavaScript&#8221;&gt;&nbsp; &lt;!&#8211;var ie=document.all;var nn6=document.getElementById&amp;&amp;!document.all;var isdrag=false;var y,x;var oDragObj;var qtD = document;function $(id){&nbsp;return getObj(id);}function getObj(id){&nbsp;return qtD.getElementById(id);}function cleanDiv(obj){(typeof(obj)==&#8221;string&#8221;?$(obj):obj).innerHTML=&#8221;;} function msgWindow(msgContext){ &nbsp;this.width=400;&nbsp;this.height=300;&nbsp;this.title = &#8221;;&nbsp;this.content = &#8221;;&nbsp;this.context = (typeof(msgContext)==&#8221;string&#8221;?$(msgContext):msgContext); &nbsp;this.popup = function(){&nbsp;&nbsp;var left &hellip; <a href=\"https:\/\/www.strongd.net\/?p=528\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u57fa\u4e8eOO\u7684\u53ef\u79fb\u52a8DIV\u7a97\u53e3\u3002<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-528","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=528"}],"version-history":[{"count":1,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":841,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions\/841"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}