JavaScript DHTML/jQuery/support

Материал из Web эксперт
Версия от 07:24, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

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>



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>



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>



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>



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>



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>



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>



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>



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>



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>



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>