问题描述
大家好,
我遇到了一个问题,我想在页面上添加运行时脚本,而且我必须在页面源代码中显示此脚本,而无需重新渲染页面,请问一下答案吧,因为这非常紧急.
我已经按照以下方式进行了编码:
Hello All,
i am facing a problem that i want to add run time script on the page as well as i have to show this in page source without re-render the page can you please post the answer since it is pretty urgent please...
I have already code in the following manners :
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'Scripts/jquery-1.4.1.min.js';
head.appendChild(script);
而且我也使用jQuery完成了同样的工作,但是我无法在页面源代码中添加代码.
请考虑:
1)我也无法刷新我的页面,因为它完全基于WCF服务请求.
1)我不能使用ScriptManager类.
Banshi
and i have also done the same using jQuery this works but i am unable to add the code in page source .
Please consider that:
1) I cant refresh my page as well since it totally based on WCF Service request .
1 )I cant use ScriptManager Class.
Banshi
推荐答案
这篇关于页面源代码中的运行时脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!