JSP(对象专用语句)
1,whit
[html]
<html>
<script language="javascript">
var current_time = new Date();
/*
用with 不需要为每次的方法调用指定对象
*/
whit(current_time)
{
var strDate=getYear()+"-";
strDate +=getMonth()+"-";
strDate +=getDate();
alert(DatStr);
}
</script>
</html>
2,for ... in: 遍历
[html]
<html>
<script language="javascript">
function Person()
{
this.name="zxx";
this.age=12;
this.height=176;
}
var p1 = new Person();
var prop,str="";
for(prop in p1)
{
str +=prop + " ";
}
alert(str);
</script>
</html>
补充:Web开发 , Jsp ,