0
下面的代码示例给出,,如何访问JSP页面中脚本标记之外的脚本变量?
<body>
<script type="text/javascript">
var i=123;
alert("Value of i= "+i);
</script>
<!-- I need to access the variable "i" here.
And store it in an integer variable.
-->
</body>
普莱舍帮助。谢谢。
因此,您需要访问脚本标签外的JavaScript? – adeneo
可能的重复[参考:为什么我的Javascript中的PHP(或其他服务器端)代码不工作?](http://stackoverflow.com/questions/13840429/reference-why-does-the-php-or-其他服务器端代码在我的JavaScript的不工作) – Quentin
JSP或JavaScript?似乎你开始混淆事物。 – Raptor