{"id":128,"date":"2011-05-04T23:30:14","date_gmt":"2011-05-04T23:30:14","guid":{"rendered":"https:\/\/shan.info\/new\/%e8%bf%87%e6%bb%a4-%e6%b3%95%e8%af%ad%e5%8a%a9%e6%89%8b-%e5%88%92%e8%af%8d%e6%90%9c%e7%b4%a2\/"},"modified":"2011-05-04T23:30:14","modified_gmt":"2011-05-04T23:30:14","slug":"%e8%bf%87%e6%bb%a4-%e6%b3%95%e8%af%ad%e5%8a%a9%e6%89%8b-%e5%88%92%e8%af%8d%e6%90%9c%e7%b4%a2","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/%e8%bf%87%e6%bb%a4-%e6%b3%95%e8%af%ad%e5%8a%a9%e6%89%8b-%e5%88%92%e8%af%8d%e6%90%9c%e7%b4%a2\/","title":{"rendered":"\u8fc7\u6ee4 \u6cd5\u8bed\u52a9\u624b \u5212\u8bcd\u641c\u7d22"},"content":{"rendered":"<p>frdic.com\/dic_resource\/frdic_grab.js<\/p>\n<p>\u539f\u4ee3\u7801\u5982\u4e0b<\/p>\n<p>\u00a0<\/p>\n<p><!--more--><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>frdic.com\/dic_resource\/frdic_grab.js<\/p>\n<p>\u539f\u4ee3\u7801\u5982\u4e0b<\/p>\n<p>\u00a0<\/p>\n<pre>var dict_is_ie = true;\r\nvar dict_host = 'http:\/\/www.frdic.com\/';\r\nvar dict_help = 'http:\/\/www.frdic.com\/service.aspx';\r\nvar dict_partner = '';\r\nvar dict_enable = false;\r\nvar dict_old_word = '';\r\nvar dict_moving = 0;\r\nvar dict_onmove = 0;\r\nvar dict_onlayer = 0;\r\nvar dict_startx = 0;\r\nvar dict_starty = 0;\r\nvar dict_cx = 0;\r\nvar dict_cy = 0;\r\nvar dict_x = 0;\r\nvar dict_y = 0;\r\nvar dict_layer;\r\nvar dict_iframe;\r\n\/*\r\n * \u63cf\u8ff0\uff1a\u8de8\u6d4f\u89c8\u5668\u7684\u8bbe\u7f6e innerHTML \u65b9\u6cd5\r\n *       \u5141\u8bb8\u63d2\u5165\u7684 HTML \u4ee3\u7801\u4e2d\u5305\u542b script \u548c style\r\n * \u4f5c\u8005\uff1akenxu \r\n * \u65e5\u671f\uff1a2006-03-23\r\n * \u53c2\u6570\uff1a\r\n *    el: \u5408\u6cd5\u7684 DOM \u6811\u4e2d\u7684\u8282\u70b9\r\n *    htmlCode: \u5408\u6cd5\u7684 HTML \u4ee3\u7801\r\n * \u7ecf\u6d4b\u8bd5\u7684\u6d4f\u89c8\u5668\uff1aie5+, firefox1.5+, opera8.5+\r\n *\/\r\nvar setInnerHTML = function (el, htmlCode) {\r\n    var ua = navigator.userAgent.toLowerCase();\r\n    if (ua.indexOf('msie') &gt;= 0 &amp;&amp; ua.indexOf('opera') &lt; 0) {\r\n        htmlCode = '<div style=\"display:none\">for IE<\/div>' + htmlCode;\r\n        htmlCode = htmlCode.replace(\/]*)&gt;\/gi,\r\n                                    '');\r\n        el.innerHTML = htmlCode;\r\n        el.removeChild(el.firstChild);\r\n    }\r\n    else {\r\n        var el_next = el.nextSibling;\r\n        var el_parent = el.parentNode;\r\n        el_parent.removeChild(el);\r\n        el.innerHTML = htmlCode;\r\n        if (el_next) {\r\n            el_parent.insertBefore(el, el_next)\r\n        } else {\r\n            el_parent.appendChild(el);\r\n        }\r\n    }\r\n}\r\n\r\n\/*\r\n * \u63cf\u8ff0\uff1a\u901a\u8fc7\u91cd\u5b9a\u4e49 document.write \u51fd\u6570\uff0c\u907f\u514d\u5728\u4f7f\u7528 setInnerHTML \u65f6\uff0c\r\n *       \u63d2\u5165\u7684 HTML \u4ee3\u7801\u4e2d\u5305\u542b document.write \uff0c\u5bfc\u81f4\u539f\u9875\u9762\u53d7\u5230\u7834\u574f\u7684\u60c5\u51b5\u3002\r\n *\/\r\ndocument.write = function() {\r\n    var body = document.getElementsByTagName('body')[0];\r\n    for (var i = 0; i &lt; arguments.length; i++) {\r\n        argument = arguments[i];\r\n        if (typeof argument == 'string') {\r\n            var el = body.appendChild(document.createElement('div'));\r\n            setInnerHTML(el, argument)\r\n        }\r\n    }\r\n}\r\n\/\/--&gt;\r\nfunction dictInit(){\r\nvar agt = navigator.userAgent.toLowerCase();\r\n  dict_is_ie = (agt.indexOf(\"msie\")!=-1 &amp;&amp; document.all);\r\n  var h = '<div id=\"dict_layer\" style=\"font-family: sans-serif;position:absolute;z-index:6000;display:none;background-color:#FFF;filter:Alpha(Opacity=96);\">';\r\n  h += '<table style=\"border:1px solid #DCDCDC;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"240\"><tbody><tr><td>';\r\n  h += '<div style=\"cursor:move;border:0px; background:url(http:\/\/www.frdic.com\/dic_resource\/grab_back.png) repeat-x scroll;\">' ;\r\n  h += '';\r\n  h += '<table border=\"0\" width=\"100%\"><tbody><tr><td width=\"60%\" align=\"left\">';\r\n  h += '<div style=\"color:#808080;font-family: sans-serif; font-size:12px;\">\u6cd5\u8bed\u52a9\u624b \u7f51\u9875\u5212\u8bcd\u7ffb\u8bd1<\/div>';\r\n  h += '<\/td><td align=\"right\">';\r\n\/\/  h += '<a href=\"'+dict_help+'\" target=\"_blank\" title=\"\u5e2e\u52a9\">';\r\n\/\/  h += '<img decoding=\"async\" src=\"'+dict_host+'\/dic_resource\/grab_help.png\" border=\"0\" align=\"absmiddle\" style=\"border:none;display:inline;\" \/>';\r\n\/\/  h += '<\/a> ';\r\n  h += '<a href=\"#\" title=\"\u5173\u95ed\">';\r\n  h += '<img decoding=\"async\" src=\"'+dict_host+'\/dic_resource\/grab_close.png\" border=\"0\" align=\"absmiddle\" style=\"border:none;display:inline;\" \/>';\r\n  h += '<\/a>';\r\n  h += '<\/td><\/tr><\/tbody><\/table>';\r\n  h += '';\r\n  h += '<div style=\"padding-top:5px;text-align:right;background-color:#F5F5F5;\"><a href=\"http:\/\/www.francochinois.com\/\" target=\"_blank\" style=\"font-family: sans-serif;font-size:12px;color:#414141;text-decoration:underline;\">\u4e0b\u8f7d\u6700\u65b0\u7248\u6cd5\u8bed\u52a9\u624b<\/a><\/div><\/div>';\r\n document.write(h);\r\n  dict_layer = document.getElementById('dict_layer');\r\n  dict_iframe = document.getElementById('dictFrame');\r\n  dictClose();\r\n  if (dictRCookie(\"dictstate\") == '0' || dict_enable) dict_enable = true;\r\n  dictUpdateStatus();\r\n  if (dict_is_ie) {\r\n      document.attachEvent(\"onmousemove\", dictMove);\r\n      document.attachEvent(\"ondblclick\", dictQuery);\r\n      document.attachEvent(\"onmouseup\", dictQuery);\r\n      document.attachEvent(\"onselectstart\", dictSelect);\r\n      document.attachEvent(\"onmousedown\", dictCheck);\r\n      window.attachEvent(\"onload\", dictUpdateStatus);\r\n  } else {\r\n      document.addEventListener(\"mousemove\", dictMove, true);\r\n      document.addEventListener(\"dblclick\", dictQuery, true);\r\n      document.addEventListener(\"mouseup\", dictQuery, true);\r\n      document.addEventListener(\"selectstart\", dictSelect, true);\r\n      document.addEventListener(\"mousedown\", dictCheck, true);\r\n      window.addEventListener(\"load\", dictUpdateStatus, true);\r\n  }\r\n}\r\n\r\nfunction dictGetSel()\r\n{\r\n\tif (window.getSelection) return window.getSelection();\r\n\telse if (document.getSelection) return document.getSelection();\r\n\telse if (document.selection) return document.selection.createRange().text;\r\n\telse return '';\r\n}\r\n\r\nfunction dictGetPos(event){\r\n  if (dict_is_ie) {\r\n    dict_x = window.event.clientX + document.documentElement.scrollLeft\r\n      + document.body.scrollLeft;\r\n    dict_y = window.event.clientY + document.documentElement.scrollTop\r\n      + document.body.scrollTop;\r\n  }else {\r\n    dict_x = event.clientX + window.scrollX;\r\n    dict_y = event.clientY + window.scrollY;\r\n  }\r\n}\r\n\r\n\r\nfunction dictSelect(e){\r\n    if (dict_moving == 2)\r\n        return false;\r\n    else\r\n        return true;\r\n}\r\n\r\nfunction dictCheck(e) {\r\n    dictGetPos(e);\r\n    var cx = 0;\r\n    var cy = 0;\r\n    var obj = dict_layer;\r\n    if (obj.offsetParent){\r\n        while (obj.offsetParent){\r\n            cx += obj.offsetLeft;\r\n            cy += obj.offsetTop;\r\n            obj = obj.offsetParent;\r\n        }\r\n    }else if (obj.x){\r\n        cx += obj.x;\r\n        cy += obj.y;\r\n    }\r\n\r\n    if(dict_moving&gt;0){\r\n        if(dict_onmove == 1){\r\n            dict_moving = 2;\r\n            dict_startx = dict_x;\r\n            dict_starty = dict_y;\r\n        }else if(dict_x &lt; cx || dict_x &gt; (cx + 240) || dict_y &lt; cy || (!dict_onlayer &amp;&amp; dict_y &gt; (cy + 100) ) ){\r\n\t    dictClose();\r\n        }else{\r\n            \r\n            dict_moving = 1;\r\n        }\r\n    }\r\n    \r\n}\r\n\r\nfunction dictQuery(e)  {\r\n    if(dict_moving == 1){\r\n        if (dict_is_ie) {\r\n            window.event.cancelBubble = true;\r\n            window.event.returnValue = false;\r\n        }else{\r\n            e.preventDefault();\r\n        }\r\n        return false;\r\n    }\r\n    if(dict_moving == 2) {\r\n        dict_cx = dict_x;\r\n        dict_cy = dict_y;\r\n        dict_moving = 1;\r\n        return false;\r\n    }\r\n\r\n    dictGetPos(e);\r\n    if (!dict_enable) return true;\r\n\r\n    var word = dictGetSel();\r\n    if(dict_is_ie) word=word.replace(\/^s*|s*$\/g,\"\");\r\n    if(word == \"\" || word.length &gt; 16 || word == dict_old_word) return true;\r\n\r\n    dictShow(word);\r\n\r\n}\r\n\r\nfunction dictDisplay(){\r\n    var dx=262;\r\n    var dy=264;\r\n    dict_y += 8;\r\n    dict_x += 16;\r\n    if(dict_is_ie){\r\n        if (document.documentElement.offsetHeight &amp;&amp; document.body.scrollTop+document.documentElement.scrollTop+document.documentElement.offsetHeight - dict_y &lt; dy){\r\n            dict_y = document.body.scrollTop+document.documentElement.scrollTop + document.documentElement.offsetHeight - dy;\r\n            dict_x += 14;\r\n        }\r\n        if (document.documentElement.offsetWidth &amp;&amp; document.body.scrollLeft+document.documentElement.scrollLeft+document.documentElement.offsetWidth - dict_x &lt; dx){\r\n            dict_x = document.body.scrollLeft+document.documentElement.scrollLeft + document.documentElement.offsetWidth - dx;\r\n        }\r\n    }else{\r\n        dx-=1;\r\n        dy+=11;\r\n        if (self.innerHeight &amp;&amp; document.body.scrollTop+document.documentElement.scrollTop + self.innerHeight - dict_y &lt; dy) {\r\n            dict_y = document.body.scrollTop+document.documentElement.scrollTop + self.innerHeight - dy;\r\n            dict_x += 14;\r\n        }\r\n        if (self.innerWidth &amp;&amp; document.body.scrollLeft+document.documentElement.scrollLeft + self.innerWidth - dict_x &lt; dx) {\r\n            dict_x = document.body.scrollLeft+document.documentElement.scrollLeft + self.innerWidth - dx;\r\n        }\r\n    }\r\n    dict_cx = dict_x;\r\n    dict_cy = dict_y;\r\n    dict_startx = dict_x;\r\n    dict_starty = dict_y;\r\n    dict_layer.style.left = dict_cx+'px';\r\n    dict_layer.style.top = dict_cy+'px';\r\n    dict_layer.style.display=\"\";\r\n    dict_moving = 1;\r\n}\r\n\r\nfunction dictShow(word){\r\n    dictDisplay();\r\n    try{\r\n        dict_iframe.src='about:blank';\r\n        iframeWin = window.frames.dictFrame;\r\n        iframeWin.document.open();\r\n        iframeWin.document.write('<span style=\"color:gray; font-size:12px;\"> \u6b63\u5728\u67e5\u627e \u00a0'+word+' \u00a0\uff0c\u8bf7\u7a0d\u540e...<\/span>');\r\n        iframeWin.document.close();\r\n    }catch(x){\r\n    }\r\n    var u=dict_host+'SearchGrab.aspx?Word='+encodeURI(word);\r\n    dict_iframe.src=u;\r\n    if(dict_is_ie) dict_old_word = word;\r\n}\r\n \r\n\r\n\r\n\/\/function dictAdd(word){\r\n\/\/    dictDisplay();\r\n\/\/    try{\r\n\/\/        dict_iframe.src='about:blank';\r\n\/\/        iframeWin = window.frames.dictFrame;\r\n\/\/        iframeWin.document.open();\r\n\/\/        iframeWin.document.write('<strong><span style=\"color: #666666;\">\u6dfb\u52a0\u751f\u8bcd\u672c:<\/span> <span style=\"color: green;\">'+word+'<\/span><\/strong><br \/><br \/>\u751f\u8bcd\u4e0a\u4f20\u4e2d...<br \/>\u8bf7\u7a0d\u5019...');\r\n\/\/        iframeWin.document.close();\r\n\/\/    }catch(x){\r\n\/\/    }\r\n\/\/    dict_old_word = '';\r\n\/\/    dict_iframe.src='http:\/\/bbs.dict.cn\/vocabulary.php?mini=1&amp;word='+word;\r\n\/\/}\r\n\r\nfunction dictMove(e){\r\n    if(dict_moving==2) {\r\n        dictGetPos(e);\r\n        dict_x = dict_x-dict_startx+dict_cx;\r\n        dict_y = dict_y-dict_starty+dict_cy;\r\n        if (document.documentElement.scrollWidth - dict_x &lt; 262) {\r\n            dict_x = document.documentElement.scrollWidth - 262;\r\n        }\r\n        dict_layer.style.left = dict_x+'px';\r\n        dict_layer.style.top = dict_y+'px';\r\n    }\r\n    \r\n}\r\n\r\nfunction dictClose() {\r\n    try\r\n    {\r\n        dict_moving = 0;\r\n        dict_onmove = 0;\r\n        dict_onlayer = 0;\r\n    \tdict_layer.style.display=\"none\";\r\n    \tif(window.sf) sf();\r\n    }\r\n    catch (x)\r\n    {\r\n    }\r\n\r\n}\r\n\r\nfunction dictWCookie(name,value)\r\n{\r\n    var date=new Date();\r\n    var now=date.getTime();\r\n    date.setTime(now+365*24*60*60*1000);\r\n    document.cookie=name+\"=\"+value+\"; path=\/; expires=\"+date.toGMTString();\r\n}\r\n\r\nfunction dictRCookie(name)\r\n{\r\n    var cookie=String(document.cookie);\r\n    var pos=cookie.indexOf(name+\"=\");\r\n    if(pos!=-1){\r\n        var end=cookie.indexOf(\"; \",pos);\r\n        return cookie.substring(pos+name.length+1,end==-1?cookie.length:end);\r\n    }\r\n    return \"\";\r\n}\r\n\r\nfunction dictEnable(){\r\n  if (dict_enable){\r\n    dict_enable = false;\r\n    dictWCookie(\"dictstate\", '1');\r\n  }else{\r\n    dict_enable = true;\r\n    dictWCookie(\"dictstate\", '0');\r\n  }\r\n  dictUpdateStatus();\r\n}\r\n\r\nfunction dictUpdateStatus(){\r\n  var el = document.getElementById('dict_status');\r\n  if(el){\r\n    el.innerHTML = dictStatus();\r\n  }\r\n}\r\n\r\nfunction dictStatus(){\r\n    if (dict_enable){\r\n       return '[<a href=\"'+dict_help+'\" target=\"_blank\" title=\"\u67e5\u770b\u5212\u8bcd\u7ffb\u8bd1\u4f7f\u7528\u5e2e\u52a9\">\u5212\u8bcd\u7ffb\u8bd1<\/a>\u5df2<a href=\"#\" title=\"\u7981\u7528\u5212\u8bcd\u7ffb\u8bd1\">\u5f00\u542f<\/a>]';\r\n    }else{\r\n      return '[<a href=\"'+dict_help+'\" target=\"_blank\" title=\"\u67e5\u770b\u5212\u8bcd\u7ffb\u8bd1\u4f7f\u7528\u5e2e\u52a9\">\u5212\u8bcd\u7ffb\u8bd1<\/a>\u5df2<a href=\"#\" title=\"\u542f\u7528\u5212\u8bcd\u7ffb\u8bd1\">\u5173\u95ed<\/a>]';\r\n    }\r\n}\r\n<\/td><\/tr><\/tbody><\/table><\/div><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>frdic.com\/dic_resource\/frdic_grab.js \u539f\u4ee3\u7801\u5982\u4e0b<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-adbloc"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}