手机游戏或者软件的脚本用什么语言写呢?js可以吗?

JavaScript020

手机游戏或者软件的脚本用什么语言写呢?js可以吗?,第1张

手机游戏一般不能用脚本语言写,而大多是是C++或者Java语言来写:

1、iOS系统下游戏(苹果手机)

大多数使用C++、Object-C语言编写

2、Android系统下游戏(安卓手机)

使用Java语言编写

js语言一般不用来编写手机游戏,更多用在Web开发上!

有其他问题欢迎到电脑管家企业平台咨询,我们将竭诚为您服务!

腾讯电脑管家企业平台:http://zhidao.baidu.com/c/guanjia/

可以读取的,给你一个例子 自动写入和读取 D://js读取文本文件.txt

注意 只能在IE模式使用

<html>

<meta http-equiv="content-type" content="text/htmlcharset=gbk" />

<head>

<script language="javascript" type="text/javascript">

//读文件

function readFile(filename){

var fso = new ActiveXObject("Scripting.FileSystemObject")

var f = fso.OpenTextFile(filename,1)

var s = ""

while (!f.AtEndOfStream)

s += f.ReadLine()+"\n"

f.Close()

return s

}

//写文件

function writeFile(filename,filecontent){

var fso, f, s 

fso = new ActiveXObject("Scripting.FileSystemObject")

f = fso.OpenTextFile(filename,8,true)

f.WriteLine(filecontent)

f.Close()alert('ok')

}

</script>

</head>

<body>

该例子 将文件保存在D盘 D://js读取文本文件.txt

<input type="text" id="in" name="in" />

<input type="button" value="保存" onClick="writeFile('D://js读取文本文件.txt', document.getElementById('in').value)"/>

<br>

<br>

<input type="button" value="读取" onClick="document.getElementById('show').value=readFile('D://js读取文本文件.txt')"/>

<br>

<textarea id="show" name="show" cols="100″ rows="20″ ></textarea>

</body>

</html>