document.write()在文档中间? [英] document.write() in the middle of a document?

查看:130
本文介绍了document.write()在文档中间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有人知道任何与

document.write()做同样工作的javascript方法,但不一定最后该文件?对于

实例,在具有特定ID

标签的元素中插入一些文本?

非常感谢

JL

Hi,

does anyone know of any javascript method that does the same job as
document.write(), but not necessarily at the end of the document? For
instance, insert some text inside an element that has a specific ID
tag?
thanks a lot
JL

推荐答案

jullag于2005年9月19日在comp.lang.javascript中写道
jullag wrote on 19 sep 2005 in comp.lang.javascript:


有没有人知道任何与
document.write()完成相同工作的javascript方法,但不一定在结尾处文献?对于
实例,在具有特定ID
标记的元素中插入一些文本?
非常感谢
JL
Hi,

does anyone know of any javascript method that does the same job as
document.write(), but not necessarily at the end of the document? For
instance, insert some text inside an element that has a specific ID
tag?
thanks a lot
JL




document.write()可以在html文档的任何地方使用,但它应该只在文档完全加载之前使用
并且隐含

document.close ()已发出。


任何下一个document.write()都会隐含地执行document.open(),从而

销毁整个页面,包括任何onpage javascript。

-

Evertjan。

荷兰。

(用我的点替换所有十字架emailaddress)



document.write() can be used anywhere in a html document, but it should
only be used before the document is fully loaded and an implicit
document.close() is issued.

Any next document.write() will implicidly do a document.open(), thereby
destroying the whole page inclusive of any onpage javascript.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


jullag写道:
有没有人知道任何与
文件做同样工作的javascript方法.write(),但不一定在文档的末尾?对于
实例,在具有特定ID
标记的元素中插入一些文本?
非常感谢
JL
does anyone know of any javascript method that does the same job as
document.write(), but not necessarily at the end of the document? For
instance, insert some text inside an element that has a specific ID
tag?
thanks a lot
JL




document.getElementById(" MyDiv")。innerHTML =" whatev er"

-

- 。

- =<> Clue博士(A.K.A. Ian A. Storms)<> = - C ++,HTML,CSS,Javascript

- =<> http://resume.drclue.net <> = - AJAX,SOAP, XML,HTTP

- =<> http://www.drclue.net <> = - SERVLETS,TCP / IP,SQL

- 。



document.getElementById("MyDiv").innerHTML="whatev er"
--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.


Clue博士写道:
jullag写道:
jullag wrote:
有没有人知道任何与
document.write()完成相同工作的javascript方法,但不一定在文档末尾?对于
实例,在具有特定ID
标记的元素中插入一些文本?
非常感谢
JL
does anyone know of any javascript method that does the same job as
document.write(), but not necessarily at the end of the document? For
instance, insert some text inside an element that has a specific ID
tag?
thanks a lot
JL




document.getElementById(" MyDiv")。innerHTML =" whatev er"




document.getElementById("MyDiv").innerHTML="whatev er"




我也有一个document.write()问题.. document.write是动态生成的
,当

document.write()执行时,页面中的其他内容都会消失..谢谢...


Frances



I''m also having a document.write() problem.. document.write is
generated dynamically, and everything else in the page disappears when
document.write() executes.. thank you...

Frances


这篇关于document.write()在文档中间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆