JavaScript DHTML/jQuery/support
Содержание
- 1 if a browser can properly interpret the opacity style property
- 2 if doing getElementsByTagName() on an object element returns all descendant elements
- 3 if getAttribute(style) is able to return the inline style specified by an element
- 4 if the browser allows table elements without tbody elements
- 5 if the browser does not clone event handlers when elements are cloned
- 6 if the browser leaves intact the results from getAttribute(href)
- 7 if the browser preserves leading whitespace when innerHTML is used
- 8 If the browser properly serializes link elements when innerHTML is used
- 9 if using appendChildcreateTextNode to inject inline scripts executes them
- 10 Rendering according to the W3C CSS Box Model
- 11 style.cssFloat is used to access the current CSS float value
if a browser can properly interpret the opacity style property
<source lang="html4strict">
<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>
</body>
</html>
</source>
if doing getElementsByTagName() on an object element returns all descendant elements
<source lang="html4strict">
<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>
</body>
</html>
</source>
if getAttribute(style) is able to return the inline style specified by an element
<source lang="html4strict">
<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>
</body>
</html>
</source>
if the browser allows table elements without tbody elements
<source lang="html4strict">
<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>
</body>
</html>
</source>
if the browser does not clone event handlers when elements are cloned
<source lang="html4strict">
<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>
</body>
</html>
</source>
if the browser leaves intact the results from getAttribute(href)
<source lang="html4strict">
<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>
</body>
</html>
</source>
if the browser preserves leading whitespace when innerHTML is used
<source lang="html4strict">
<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>
</body>
</html>
</source>
If the browser properly serializes link elements when innerHTML is used
<source lang="html4strict">
<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>
</body>
</html>
</source>
if using appendChildcreateTextNode to inject inline scripts executes them
<source lang="html4strict">
<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>
</body>
</html>
</source>
Rendering according to the W3C CSS Box Model
<source lang="html4strict">
<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>
</body>
</html>
</source>
style.cssFloat is used to access the current CSS float value
<source lang="html4strict">
<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>
</body>
</html>
</source>