zoukankan      html  css  js  c++  java
  • jQuery.support的实现方式

         jQuery.support 用于检查浏览器对各项特性的支持。检查项多达 27 个。
         首先,让我们用一段代码测试一下 support 中包含的检查项:

    <script src='jquery.js'></script>
    <script>
    support = $.support;
    for (key in support) {
        document.write('support.' + key + ' = ' + support[key] + '<br />');
    }
    </script>


    IE 下的输出结果为:

    support.leadingWhitespace = false
    support.tbody = false
    support.htmlSerialize = false
    support.style = false
    support.hrefNormalized = false
    support.opacity = false
    support.cssFloat = false
    support.checkOn = true
    support.optSelected = false
    support.getSetAttribute = false
    support.submitBubbles = false
    support.changeBubbles = false
    support.focusinBubbles = true
    support.deleteExpando = false
    support.noCloneEvent = false
    support.inlineBlockNeedsLayout = false
    support.shrinkWrapBlocks = true坏帐
    support.reliableMarginRight = true
    support.noCloneChecked = false
    support.optDisabled = true
    support.radioValue = false
    support.checkClone = undefined
    support.appendChecked = false
    support.boxModel = false
    support.reliableHiddenOffsets = false
    support.ajax = true
    support.cors = false

    FireFox 中的显示结果为:

    support.leadingWhitespace = true
    support.tbody = true
    support.htmlSerialize = true
    support.style = true
    support.hrefNormalized = true
    support.opacity = true
    support.cssFloat = true
    support.checkOn = true
    support.optSelected = true
    support.getSetAttribute = true
    support.submitBubbles = true
    support.changeBubbles = true
    support.focusinBubbles = false
    support.deleteExpando = true
    support.noCloneEvent = true
    support.inlineBlockNeedsLayout = false
    support.shrinkWrapBlocks = false
    support.reliableMarginRight = true
    support.noCloneChecked = true
    support.optDisabled = true
    support.radioValue = true淘宝女装夏装新款
    support.checkClone = undefined
    support.appendChecked = true
    support.boxModel = true
    support.reliableHiddenOffsets = true
    support.ajax = true
    support.cors = true

  • 相关阅读:
    linux ls
    ExtJs 弹出窗口
    Redhat5 装中文
    Linux下配置JDK以及报cannot restore segment prot after reloc: Permission denied错解决方案
    工具
    得到剪切的图片
    label button等设置不同颜色的标题
    UITableView UITextField 键盘挡住
    给出颜色生成图片
    一个不错的学习网站
  • 原文地址:https://www.cnblogs.com/sky7034/p/2047495.html
Copyright © 2011-2022 走看看