在外部js中访问vbscript块变量? [英] Accessing vbscript block variable in external js ?
问题描述
大家好,首先感谢您查看问题。伙计我需要知道如何将asp脚本中的VB脚本变量值传递给我的js外部文件。
例如: - 我有<℅var abc ='value'℅>
在我的asp页面中
现在我有一个javascript页面,其中我需要ABC的值来操作一些功能......我怎么能这样做
我尝试了什么:
我曾经使用服务器分隔符访问它们但是我可以怀疑它不工作
例如: -
<℅abc℅>
请帮助我如何在JavaScript中获得价值文件,所以我可以进一步感谢
Hello guys first thanks for checking out problem. Guys I need to know how can I get the VB script var value which is inside of asp page to my js externalfile .
E.g :- I have <℅ var abc ='value' ℅>
In my asp page
Now I have a javascript page in which I need the value of ABC to manipulate few functionality ... How can I do it
What I have tried:
I used to access them using server delimeters but I can suspect its not working
e.g:-
<℅ abc ℅>
Please help me how can I get the value in JavaScript file so I can move further thanks
推荐答案
你不能,因为这是两个完全不同的独立执行环境。
但是,您可以在HTML页面中作弊并使用VBScript代码可以设置的隐藏字段,然后可以读取JS代码。
You can't because those are two entirely different and separate execution environments.
You can, however, cheat and use a hidden field in the HTML page that the VBScript code can set and then the JS code can then read.
这篇关于在外部js中访问vbscript块变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!