Show object content.
Information
Show myForm object content.
Code
<form id="myForm" action="javascript:void(null);">
<input type="text" id="myFile" value="10" size="50" maxlength="10">
</form>
<br /><br />
<textarea name="myDisplay" id="myDisplay" cols="70" rows="50" ></textarea>
<script language="javascript" type="text/javascript">
function jsxShowObjectContent(obj) {
str='';
for(prop in obj) {
str+=prop + " value :"+ obj[prop]+"\n";
}
return(str);
}
var myContent = jsxShowObjectContent(document.getElementById('myForm'));
document.getElementById('myDisplay').value = myContent;
</script>
Result
|