1.字符串:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
var x=new String();
x="1234";
document.write(x.length+"<br/>"); //字符串长度
document.write(x.indexOf("2",0)) //找到2的位置
</script>
</head>
<body>
</body>
</html>
2.日期
用到再说
3.数组:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
var x=new Array(3);
for(var i=3; i>0; i++)
x[i]=i;
document.write(x.sort()); //快排
</script>
</head>
<body>
</body>
</html>