百度分享中一段奇怪的JavaScript代码如何理解?

百度分享(http://share.baidu.com/code/a...中的JavaScript代码如下:

<script>

     window._bd_share_config = {

         "common": {

             "bdSnsKey": {},

             "bdText": "",

             "bdMini": "2",

             "bdMiniList": ["mshare", "copy", "weixin", "qzone", "tsina", "bdysc", "douban", "renren", "tqq",

                 "bdxc", "sqq", "tqf", "tieba", "bdhome", "ibaidu", "fx", "youdao", "sdo", "qingbiji", "mail",

                 "isohu", "ty", "h163", "evernotecn", "print"],

             "bdPic": "",

             "bdStyle": "1",

             "bdSize": "24"

         }, "slide": {"type": "slide", "bdImg": "1", "bdPos": "right", "bdTop": "100"}

     };

     with(document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src =

         'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

</script>

这段代码共两条语句,前面一条声明一个对象,这不难理解;但第二条语句如何理解?尤其是with(document)0[...]中的数字0怎么理解?

陪伴而非守候
浏览 476回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript