JavaScript Reference/Javascript Methods/mergeAttributes
"mergeAttributes()" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function1(){
myDiv2.mergeAttributes(myDiv1);
} </script>
<button onclick="function1();">Merge attributes</button> </body> </html>
</source>
"mergeAttributes()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | <bgsound> |
| ||| |<body>
| | |<button>| | | | | |
| |<dir><col> | | |<colgroup> <comment> | | |<custom>
| | | || | |
- | | | <embed> | | |<fieldset> | | |<form> <frame> | | |<frameset> <head> | | |<hn>
|| |<html> | | |<iframe> <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="hidden"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | | | |<label> <legend> |
| |- <link> | | |<listing> <map> | | |<marquee> <menu> | | |<object>
| | |<option>
| | |<plaintext>
| | || | | <script> | | |<select> | | || | | | | || | |<tbody>
| | |<textarea> <tfoot> |
| |<thead> | | |<title> | | | | | | | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>
"mergeAttributes()" Syntax, Parameters and Note
<source lang="javascript"> Note: Copies all attributes (except id and name) from one element to another.
Syntax:
document.all.elementID.mergeAttributes(param1, param2) Parameters: param1 Required; the from element. param2 Optional; true or false, indicating whether or not the id of the element is preserved.
</source>