js4:with,for in语句,windows,location对象的使用
2017-07-11 00:33
363 查看
原文发布时间为:2008-11-08 —— 来源于本人的百度文章 [由搬家工具导入]
<html>
<head>
<title>js</title>
<script type="text/JavaScript">
<!--
function Car(make,model,color){
this.make=make;
this.model=model;
this.color=color;
}
function openthat(){
window.open("js3.html","that","height=300,width=400,toolbar=yes,scrollbars=yes,directories=yes,location=yes menubar=yes,resizable=no,status=yes");
}
function timeout(){
document.write("time over");
}
function showdate(){
var dt=new Date();
document.getElementById("stime").innerText=dt.getSeconds();
}
var st=setInterval("showdate();",1000);
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
-->
</style></head>
<body background="../../图片/女孩子啊/de4149086dd0f2c562d98610.jpg">
<script type="text/JavaScript">
<!--
var car=new Car();
car.make="china";
car.model="003";
car.color="red";
for(var prop in car){
if(prop=="model")
continue;
document.write(prop+"="+car[prop]+"<br>");
}
var car2=new Car();
with(car2){
make="English";
model="009";
color="yellow";
}
for(var prop in car2){
document.write(prop+"="+car2[prop]+"<br>");
}
//var tm=setTimeout("timeout();",3000);
//-->
</script>
<a href="#" onClick="openthat();">js3de</a>
<br>
<a href="#" onClick="window.open('js3.html');">open</a>
<input type=button name="quit" value="close" onClick="window.close();">
<!-- <input type=button name="not" value="donot" onClick="clearTimeout(tm);"> -->
<p> </p>
<p><span id="stime"></span>
<input type=button name="stop" value="stop" onClick="clearInterval(st);">
<input type="button" name="goto" Value="GO TO" onClick="parent.js3.location.href='http://www.baidu.com'">
<input type="button" name="goto" Value="Reflesh" onClick="parent.location.reload(true);">
<input type="button" name="goto" Value="Replace" onClick="parent.js3.location.replace('http://www.baidu.com');">
<input type="button" name="who" Value="frames" onClick="parent.frames[1].location.replace('http://www.baidu.com');">
</p>
<p> </p>
</body>
</html>
<html>
<head>
<title>js</title>
<script type="text/JavaScript">
<!--
function Car(make,model,color){
this.make=make;
this.model=model;
this.color=color;
}
function openthat(){
window.open("js3.html","that","height=300,width=400,toolbar=yes,scrollbars=yes,directories=yes,location=yes menubar=yes,resizable=no,status=yes");
}
function timeout(){
document.write("time over");
}
function showdate(){
var dt=new Date();
document.getElementById("stime").innerText=dt.getSeconds();
}
var st=setInterval("showdate();",1000);
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
-->
</style></head>
<body background="../../图片/女孩子啊/de4149086dd0f2c562d98610.jpg">
<script type="text/JavaScript">
<!--
var car=new Car();
car.make="china";
car.model="003";
car.color="red";
for(var prop in car){
if(prop=="model")
continue;
document.write(prop+"="+car[prop]+"<br>");
}
var car2=new Car();
with(car2){
make="English";
model="009";
color="yellow";
}
for(var prop in car2){
document.write(prop+"="+car2[prop]+"<br>");
}
//var tm=setTimeout("timeout();",3000);
//-->
</script>
<a href="#" onClick="openthat();">js3de</a>
<br>
<a href="#" onClick="window.open('js3.html');">open</a>
<input type=button name="quit" value="close" onClick="window.close();">
<!-- <input type=button name="not" value="donot" onClick="clearTimeout(tm);"> -->
<p> </p>
<p><span id="stime"></span>
<input type=button name="stop" value="stop" onClick="clearInterval(st);">
<input type="button" name="goto" Value="GO TO" onClick="parent.js3.location.href='http://www.baidu.com'">
<input type="button" name="goto" Value="Reflesh" onClick="parent.location.reload(true);">
<input type="button" name="goto" Value="Replace" onClick="parent.js3.location.replace('http://www.baidu.com');">
<input type="button" name="who" Value="frames" onClick="parent.frames[1].location.replace('http://www.baidu.com');">
</p>
<p> </p>
</body>
</html>
相关文章推荐
- js第三课用于对象语句for in语句和with语句
- Javascript_5_with语句_Math对象_Global对象_for in语句
- (转 )Delphi指针如何指向使用with开域语句创建的无名组件对象
- JS模拟面向对象,对象原型,JSON,with语句,for in 语句
- js使用for in语句遍历对象的属性
- with语句的使用
- 如何使用with...as...构造SQL语句
- 使用aspnet_regsql.ext命令行工具后,就不能用sql语句创建新的表了,总是显示已存在XXX对象。
- 在js中使用"with"语句中跨frame的变量引用问题
- sql2000备份的数据库还原到sql2005后,选择“数据库关系图”提示:此数据库没有有效所有者,因此无法安装数据库关系图支持对象。若要继续,请首先使用“数据库属性”对话框的“文件”页或 ALTER AUTHORIZATION 语句将数据库所
- with语句中访问匿名对象自身
- 第2章 Java编程基础——FAQ2.22 创建String对象时, 使用String s=new String (“abc”)和String s=“abc”语句有什么区别?
- sql2000备份的数据库还原到sql2005后,选择“数据库关系图”提示:此数据库没有有效所有者,因此无法安装数据库关系图支持对象。若要继续,请首先使用“数据库属性”对话框的“文件”页或 Alter AUTHORIZATION 语句将数据库
- WSSv3 Technical Articles_最佳实践:Windows SharePoint Services对象使用Disposable
- Working with Docbook on Windows 在Windows下使用Docbook
- 有关对象克隆和使用了prototype后,for..in语句的问题
- window对象的status、location、name、self、opener属性的使用
- oracle-检查对象存在与否,并建立相应对象--plsql中使用DDL语句如Create 等
- js的with语句使用方法