JavaScript Tutorial/jQuery/support — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:25, 26 мая 2010

30. if a browser can properly interpret the opacity style property

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.opacity);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if doing getElementsByTagName() on an object element returns all descendant elements

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.objectAll);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if getAttribute(style) is able to return the inline style specified by an element

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.style);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if the browser allows table elements without tbody elements

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.tbody);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if the browser does not clone event handlers when elements are cloned

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.noCloneEvent);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if the browser leaves intact the results from getAttribute(href)

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.hrefNormalized);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if the browser preserves leading whitespace when innerHTML is used

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.leadingWhitespace);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. If the browser properly serializes link elements when innerHTML is used

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.htmlSerialize);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. if using appendChildcreateTextNode to inject inline scripts executes them

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.scriptEval);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. Rendering according to the W3C CSS Box Model

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.boxModel);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>


30. style.cssFloat is used to access the current CSS float value

<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
              $("p").text(jQuery.support.cssFloat);
        });
    </script>
  </head>
  <body>
    <body>
        <p></p>
    </body>
</html>