| <script language="javascript"> |
| var frm = document.getElementById("frm"); |
| var tf = document.getElementById('tf'); |
| tf.setAttribute('value', 'Almost Original Value'); |
| log('Markup: ' + String(frm.innerHTML)); |
| log('Value: ' + tf.value); |
| log('Attribute: ' + tf.getAttribute('value')); |
| log('Markup: ' + String(frm.innerHTML)); |
| log('Value: ' + tf.value); |
| log('Attribute: ' + tf.getAttribute('value')); |
| var console_messages = document.createElement("ol"); |
| var console = document.getElementById('console'); |
| var item = document.createElement("li"); |
| item.appendChild(document.createTextNode(String(message).replace(/0x[0-9a-fA-F]{8}/g, "0xXXXXXXXX"))); |
| console.appendChild(item); |
| This tests that the JS property value and the attribute value for a hidden input field are the same.<br> |
| <input type="hidden" id="tf" value="Original value"> |