机场大巴最晚到几点:document.write函数的用法?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/30 10:00:37

里面的内容为字符串形式,要加双引号
也可以是HTML代码,如下内容:

<script language=javascript>

document.write ("<marquee scrollamount='1' scrolldelay='30' direction= 'UP' onmouseover=this.stop() onmouseout=this.start() width='400' id='helpor_net' height='265' align='center' onmouseover='ik8_com.stop()' onmouseout='ik8_com.start()' Author:redriver; For more,visit:www.ik8.com>")

document.write ("<p><font color='pink' face=华文行楷 size=3> ")
document.write ("<p> 小时候的梦想")
document.write ("<p> 从来就不曾遗忘")
document.write ("<p> 找个世上最美的新娘")
document.write ("<p> 陪你到地久天长")
document.write ("<p> 爱你到地老天荒")
document.write ("<p> 用我温柔的心带你一起飞翔")
document.write ("<p> 我想打开心房")
document.write ("<p> 让你在心中回荡")
document.write ("<p> 拥有每个梦你的夜晚")
document.write ("<p> 当接触你的眼光")
document.write ("<p> 我的心地旋天转")
document.write ("<p> 意乱情迷的我为你痴狂")
document.write ("</font>")

document.write ("</marquee> ")
</script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<script language="javascript">
<!--
document.write("testtest<br/>testtest");
// -->
</script>
</BODY>
</HTML>

=================
Writes one or more HTML expressions to a document in the specified window.

Syntax

document.write(sText)
Parameters

sText Required. String that specifies the text and HTML tags to write.

Return Value

No return value.

Remarks

You should not use the write or writeln methods on the current document after the document has finished loading unless you first call the open method, which clears the current document's window and erases all variables.