在非IE浏览器中,带下滑线的变量如何访问
时间:2011-11-26
来源:互联网
例如:
js文件中
var _stylePath = null//图片所在的路径
var _curentFrame = null;//当前框架的ID
var _curentUrl = null; //当前框架的地址
var _isShowCloseBtn = null;
function test()
{
_stylePath ="main/main.css"
alert(_stylePath )
}
在html中
<td>
<script>
var t = new test();
</script></td>
在chrome浏览器中,无法弹出正确读取_stylePath的值.
js文件中
var _stylePath = null//图片所在的路径
var _curentFrame = null;//当前框架的ID
var _curentUrl = null; //当前框架的地址
var _isShowCloseBtn = null;
function test()
{
_stylePath ="main/main.css"
alert(_stylePath )
}
在html中
<td>
<script>
var t = new test();
</script></td>
在chrome浏览器中,无法弹出正确读取_stylePath的值.
作者: alexsongff 发布时间: 2011-11-26
我这边没问题,你其他代码错误导致js不能解释执行吧
HTML code
HTML code
<body> <script> var _stylePath = null//图片所在的路径 var _curentFrame = null;//当前框架的ID var _curentUrl = null; //当前框架的地址 var _isShowCloseBtn = null; function test() { _stylePath ="main/main.css" alert(_stylePath ) } var t = new test(); </script></body>
作者: p2227 发布时间: 2011-11-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28