Ajax解雇javascript [英] Ajax firing off javascript
问题描述
我正在使用Ajax通过以通常的方式设置
innerHTML = request.responseText来刷新DIV区域。在回复文本中我
有< SCRIPT>在行中标记,但这不会执行。有没有办法让这个ajax刷新过程。
谢谢
Mike
I am using Ajax to refresh a DIV area by setting the
innerHTML=request.responseText in the usual manner. in the response text I
have a <SCRIPT> tag in line, but this is not executed. Is there a way of
making the ajax refresh process this.
Thanks
Mike
推荐答案
John Smith写道:
John Smith wrote:
我正在使用Ajax刷新DIV区域通过以通常的方式设置
innerHTML = request.responseText。在回复文本中我有一个< SCRIPT>在行中标记,但这不会执行。是否有一种方法可以进行ajax刷新过程。
I am using Ajax to refresh a DIV area by setting the
innerHTML=request.responseText in the usual manner. in the response text I
have a <SCRIPT> tag in line, but this is not executed. Is there a way of
making the ajax refresh process this.
ajax refresh?
如果你设置了一个元素的innerHTML并且在那里有脚本元素
那么对于使用延迟的IE,例如
< script type =" text / javascript"延迟>
有助于执行脚本。
但是不要在延迟脚本中执行任何document.write。
- -
Martin Honnen
http:// JavaScript.FAQTs.com/
试过这个,但无法让它工作我的脚本标签有以下内容:
< script type =''text / javascript''defer>
window.location.reload();
< ; / script>
任何想法
谢谢
Mike
" Martin Honnen" <毫安******* @ yahoo.de>在消息中写道
news:43 ********************* @ newsread2.arcor-online.net ...
Tried this but could not get it to work my script tag has the following:
<script type=''text/javascript'' defer>
window.location.reload();
</script>
Any ideas
Thanks
Mike
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:43*********************@newsread2.arcor-online.net...
John Smith写道:
John Smith wrote:
我正在使用Ajax通过以通常的方式设置
innerHTML = request.responseText来刷新DIV区域。在回复文本中
我有一个< SCRIPT>在行中标记,但这不会执行。是否有办法进行ajax刷新过程。
I am using Ajax to refresh a DIV area by setting the
innerHTML=request.responseText in the usual manner. in the response text
I have a <SCRIPT> tag in line, but this is not executed. Is there a way
of making the ajax refresh process this.
ajax refresh?
如果设置了元素的innerHTML,在那里有脚本元素然后
用于IE使用延迟例如
< script type =" text / javascript"延迟>
有助于执行脚本。
但是不要在延期脚本中执行任何document.write。
-
> Martin Honnen
http://JavaScript.FAQTs.com/
"ajax refresh"?
If you set innerHTML of an element and have script elements in there then
for IE using defer e.g.
<script type="text/javascript" defer">
helps to get the script executed.
But don''t do any document.write in deferred scripts.
--
Martin Honnen
http://JavaScript.FAQTs.com/
我找到了一种方法,在一个带有onload
标签的区域中包含一个图像,这是在图像显示。我只使用1px乘1px
透明gif。
迈克
" John Smith" <乔******** @ ntlworld.com>在留言中写道
news:43 ********************** @ news.aaisp.net.uk ...
I have found a way of doing it, include an image in the area with an onload
tag, this is fired when the image is displayed. I just use a 1px by 1px
transparent gif.
Mike
"John Smith" <jo********@ntlworld.com> wrote in message
news:43**********************@news.aaisp.net.uk...
试过这个,但无法使它工作我的脚本标签有以下内容:
< script type =''text / javascript''defer>
> window.location.reload();
< / script>
任何想法
谢谢
迈克
Martin Honnen <毫安******* @ yahoo.de>在消息中写道
新闻:43 ********************* @ newsread2.arcor-online.net ...
Tried this but could not get it to work my script tag has the following:
<script type=''text/javascript'' defer>
window.location.reload();
</script>
Any ideas
Thanks
Mike
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:43*********************@newsread2.arcor-online.net...
John Smith写道:
John Smith wrote:
我正在使用Ajax通过以通常的方式设置
innerHTML = request.responseText来刷新DIV区域。在回复文本中
我有一个< SCRIPT>在行中标记,但这不会执行。是否有办法进行ajax刷新过程。
I am using Ajax to refresh a DIV area by setting the
innerHTML=request.responseText in the usual manner. in the response text
I have a <SCRIPT> tag in line, but this is not executed. Is there a way
of making the ajax refresh process this.
ajax refresh?
如果设置了元素的innerHTML,在那里有脚本元素然后
用于IE使用延迟例如
< script type =" text / javascript"延迟>
有助于执行脚本。
但是不要在延期脚本中执行任何document.write。
-
> Martin Honnen
http://JavaScript.FAQTs.com/
"ajax refresh"?
If you set innerHTML of an element and have script elements in there then
for IE using defer e.g.
<script type="text/javascript" defer">
helps to get the script executed.
But don''t do any document.write in deferred scripts.
--
Martin Honnen
http://JavaScript.FAQTs.com/
这篇关于Ajax解雇javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!