[]获取index.html中的值
如题:在index.html中定义两个变量并赋值;我想在游戏中获取到这个值,怎么做;上代码;
<html>
<head>
<meta charset='utf-8'/>
<title>www.layabox.com</title>
<meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='full-screen' content='true' />
<meta name='screen-orientation' content='portrait' />
<meta name='x5-fullscreen' content='true' />
<meta name='360-fullscreen' content='true' />
<meta http-equiv='expires' content='0' />
<meta name='laya' logoimg='logo.png' logobkcolor='#ffffff' screenorientation='landscape' cacheid='fffffffff' />
</head>
<body style='margin:0;overflow:none;overflow-x:hidden;overflow-y:hidden;background-color: #000;'>
<!-------定义变量赋值-------->
<script>
var acc:String = "123456";
var psd:String = "654321";
</script>
<script src='myLaya.max.js' loader='laya'></script>
</body>
</html>
<html>
<head>
<meta charset='utf-8'/>
<title>www.layabox.com</title>
<meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='full-screen' content='true' />
<meta name='screen-orientation' content='portrait' />
<meta name='x5-fullscreen' content='true' />
<meta name='360-fullscreen' content='true' />
<meta http-equiv='expires' content='0' />
<meta name='laya' logoimg='logo.png' logobkcolor='#ffffff' screenorientation='landscape' cacheid='fffffffff' />
</head>
<body style='margin:0;overflow:none;overflow-x:hidden;overflow-y:hidden;background-color: #000;'>
<!-------定义变量赋值-------->
<script>
var acc:String = "123456";
var psd:String = "654321";
</script>
<script src='myLaya.max.js' loader='laya'></script>
</body>
</html>
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
cuixueying
赞同来自: