What are the document methods supported by Legacy DOM?

HTMLJavascriptProgramming Scripts

The following is the list of document methods supported by Legacy DOM −

Sr.No
Property & Description
1
clear( )
Deprecated − Erases the contents of the document and returns nothing.
Ex − document.clear( )
2
close( )
Closes a document stream opened with the open( ) method and returns nothing.
Ex − document.close( )
3
open( )
Deletes existing document content and opens a stream to which new document contents may be written. Returns nothing.
Ex − document.open( )
4
write( value, ...)
Inserts the specified string or strings into the document currently being parsed or appends to document opened with open( ). Returns nothing.
Ex − document.write( value, ...)
5
writeln( value, ...)
Identical to write( ), except that it appends a newline character to the output. Returns nothing.
Ex − document.writeln( value, ...)
raja
Published on 23-Feb-2018 12:35:45
Advertisements