例如:
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的值.
<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>