<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的js之旅 </title>
</head>
<script language="javascript" type="text/javascript">
<!--
function student()
{
this.id="";
this.name="";
}
var tom=new student();
with(tom)
{
id="001";
name="小伟";
}
myFun(tom);
function myFun(my_obj)
{
window.alert("id:"+ " "+my_obj.id+"\n"+"name:"+" "+my_obj.name);
}
//!-->
</script>
<body>
</body>
</html>