ne znam sta ti znaci "sa svim željenim mogućnostima (npr. da se zameni ceo taj deo nekim novim)."
ja stvarno ne mogu da se setim ovoga iz praxe, jer kada je NN3 bio aktuelan, ja sam radio samo cist html. ali sudeci po ovom ORaily JavaScript Refence iz DW, ovo je radilo josh u NN2!!
Citat:
write( ), writeln( ) NN 2 IE 3 DOM n/a
write("string")
writeln("string")
When invoked as the page loads, these methods can dynamically add content to the page. When invoked after the page has loaded, a single method invocation clears the current document, opens a new output stream, and writes the content to the window or frame. A document.close( ) method is required afterward. Because the first document.write( ) or document.writeln( ) method destroys the current document, do not use two or more writing statements to create a new document. Instead load the content into one variable and pass that variable as the parameter to a single document.write( ) or document.writeln( ) method.
The difference between the two methods is that document.writeln( ) adds a carriage return to the source code it writes to the document. This is not reflected in the rendered content, but can make reading the dynamic source code easier in browser versions that support dynamic content source viewing (Navigator does so as a wysiwyg: URL in the source view window).
Returned Value
None.
Parameters
string Any string value, including HTML tags. To write <SCRIPT> tags, use entity characters for the brackets: <SCRIPT>.
jedino ne znam od kada radi <script src="..."> ali ni to nije od skoro (sigurno radilo u NN3).
znaci, ne znam sta oces da kazes.
Code:
<script language="JavaScript"><!--
document.write("ovo ce zameniti ceo ovaj script tag");
//--></script>
radi bash to. menja js source, tj izvrsava ga, i na njegovom mestu ispisuje "ovo ce ..."
sta bi ti josh/drugo hteo?
Potpis