JavaScript Reference/Javascript Collections/filters
Содержание
"filters" Example
<source lang="javascript">
<html> <head> <script language="JavaScript"> function applyFilter(){
myDiv.style.filter = "progid:DXImageTransform.Microsoft.shadow() progid:DXImageTransform.Microsoft.motionblur();" myDiv.filters.item("DXImageTransform.Microsoft.shadow").direction=4 myDiv.filters.item("DXImageTransform.Microsoft.motionblur").enabled=true; alert(document.all.myDiv.filters.length);
}
</script>
</head>
<body>
<img id="myDiv" src="yourimage.gif">
<button onclick="applyFilter();">Apply Filter</button>
</body>
</html>
</source>
"filters" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To | <body> | | |<button> <custom> |
| || |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | |<marquee>
| || | |<textarea> | |
+----------------+--------------------------------------------------------------+ </source>
"filters" JavaScript properties and JavaScript methods<source lang="javascript"> JavaScript properties and JavaScript methods item(), length, namedItem()
</source>
"filters" Syntax Parameters and Note<source lang="javascript"> Note: Returns an array of all filters that have been added to the element. Syntax: document.all.elementID.filters // returns all filters document.all.elementID.filters(param1) // returns an individual filter param1 Required; zero-based index or the name of the filter being used.</source> |
---|