11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

newEmployee.appendChild(newPhone);<br />

var newEmail = xmldoc.createElement('email');<br />

var newEmailText =<br />

xmldoc.createTextNode(document.myform.emailfield.value);<br />

}<br />

newEmail.appendChild(newEmailText);<br />

newEmployee.appendChild(newEmail);<br />

/* append completed record to the document */<br />

rootElement.appendChild(newEmployee);<br />

function dump(string)<br />

{<br />

}<br />

var currentvalue=document.myform.showxml.value;<br />

currentvalue+=string;<br />

document.myform.showxml.value = currentvalue;<br />

function display(node)<br />

{<br />

var type = node.nodeType;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!