JavaScript Reference/Javascript Methods/write — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
"write()" Example
<html>
<body>
<script language="JavaScript">
function function1() {
var m = "<p>First paragraph.</p>";
m += "<p>second paragraph.</p>"
document.write(m);
}
</script>
<input type="button" value="Add some HTML content to this page" onClick="function1();">
</body>
</html>
"write()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document |
+----------------+--------------------------------------------------------------+
"write()" Syntax Parameters and Note
Note:
Writes HTML document content.
Syntax:
document.write(param1)
Parameters:
param1 Required; the text and HTML tags to write.