标签:
1. Javascript对象
function myFun(){
var x;
var txt = "";
var person = {fname:"Bill", lname:"Gate", age:56}
for (x in person){
txt = txt + person[x] + " ";
}
document.getElementById("demo").innerHTML = txt;
}
2. break
cars=["BMW","Volvo","Saab","Ford"];
list:{
document.write(cars[0] + "<br>");
document.write(cars[1] + "<br>");
document.write(cars[2] + "<br>");
break list;
document.write(cars[3] + "<br>");
document.write(cars[4] + "<br>");
document.write(cars[5] + "<br>");
}
标签:
原文地址:http://www.cnblogs.com/lianfu/p/4952936.html