<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javascript"> function computer(name,hdspace,ram)
{
this.speed=name;
this.hdspace=hdspace;
this.ram=ram; } function get_price(computer)
{
the_price=1000;
if (computer.speed=500 )
the_price+=200;
else
the_price+=100; if ( computer.hdspace=15 )
the_price+=150;
else
the_price+=75; return the_price;
}
function price(){var work_computer=new computer(500,15,128);
var home_computer=new computer(450,10,64);
var laptop_computer=new computer(350,7,32); work_computer_price=get_price(work_computer);
home_computer_price=get_price(home_computer);
laptop_computer=get_price(laptop_computer);document.write ("type"+" "+"speed"+" "+"hdspace"+" "+"ram"+"<p>");
document.write("work_computer"+ " "+work_computer.speed+" "+work_computer.hdspace+" "+workcoputer.ram+"<p>");
document.write("home_computer"+" "+home_computer.speed+" "+home_computer.hdspace+" "+home_computer.ram+"<p>");
document.write("laptop_computer"+" "+laptop_computer.speed+" "+laptop_computer.hdspace+" "+laptop_computer.ram);} </script></HEAD><BODY>
<form>
<table>
<input type=button value=clickme onclick="price()">
</table>
</form></BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javascript"> function computer(name,hdspace,ram)
{
this.speed=name;
this.hdspace=hdspace;
this.ram=ram; } function get_price(computer)
{
the_price=1000;
if (computer.speed=500 )
the_price+=200;
else
the_price+=100; if ( computer.hdspace=15 )
the_price+=150;
else
the_price+=75; return the_price;
}
function price(){var work_computer=new computer(500,15,128);
var home_computer=new computer(450,10,64);
var laptop_computer=new computer(350,7,32); work_computer_price=get_price(work_computer);
home_computer_price=get_price(home_computer);
laptop_computer=get_price(laptop_computer);document.write ("type"+" "+"speed"+" "+"hdspace"+" "+"ram"+"<p>");
document.write("work_computer"+ " "+work_computer.speed+" "+work_computer.hdspace+" "+workcoputer.ram+"<p>");
document.write("home_computer"+" "+home_computer.speed+" "+home_computer.hdspace+" "+home_computer.ram+"<p>");
document.write("laptop_computer"+" "+laptop_computer.speed+" "+laptop_computer.hdspace+" "+laptop_computer.ram);} </script></HEAD><BODY>
<form>
<table>
<input type=button value=clickme onclick="price()">
</table>
</form></BODY>
</HTML>
解决方案 »
- Environment.ResourceUrl 这是个什么对象
- 不同系统跨域访问传值!求救
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 求一个二维数据排序的问题
- ●●●●●●●●●●●●●●●●●●●●●●●●●●●javascript实现屏幕截屏 连续起来就是动画??????
- ************************************这一行代码怎么出来的是undefined???
- 怎么样给网页设置浏览权限??
- Extjs3.4添加一个静态表单
- jqChart 去掉打印按钮
- 求助!已知名称不知类型
- 用js自动生成一个select下拉选项框
- (高分求教)如何获得两个日期之间的间隔天数!!!!!
- iframe问题
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""><script language="javascript">
function computer(speed,hdspace,ram) {
this.speed=speed;
this.hdspace=hdspace;
this.ram=ram;
}function get_price(computer) {
the_price=1000;
if(computer.speed==500 )
the_price+=200;
else
the_price+=100;
if( computer.hdspace=15 )
the_price+=150;
else
the_price+=75;
return the_price;
}function price() {
var work_computer=new computer(500,15,128);
var home_computer=new computer(450,10,64);
var laptop_computer=new computer(350,7,32); work_computer_price=get_price(work_computer);
home_computer_price=get_price(home_computer);
laptop_computer=get_price(laptop_computer); document.write("type"+" "+"speed"+" "+"hdspace"+" "+"ram"+"<p>");
document.write("work_computer"+ " "+work_computer.speed+" "+work_computer.hdspace+" "+work_computer.ram+"<p>");
document.write("home_computer"+" "+home_computer.speed+" "+home_computer.hdspace+" "+home_computer.ram+"<p>");
document.write("laptop_computer"+" "+laptop_computer.speed+" "+laptop_computer.hdspace+" "+laptop_computer.ram);
}</script></HEAD><BODY>
<input type=button value=clickme onclick="price()">
</BODY>
</HTML>
type speed hdspace ram
work_computer 500 15 128home_computer 450 15 64laptop_computer undefined undefined undefined
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""><script language="javascript">
function computer(speed,hdspace,ram) {
this.speed=speed;
this.hdspace=hdspace;
this.ram=ram;
}function get_price(computer) {
the_price=1000;
if(computer.speed==500 )
the_price+=200;
else
the_price+=100;
if( computer.hdspace==15 )
the_price+=150;
else
the_price+=75;
return the_price;
}function price() {
var work_computer=new computer(500,15,128);
var home_computer=new computer(450,10,64);
var laptop_computer=new computer(350,7,32); work_computer_price=get_price(work_computer);
home_computer_price=get_price(home_computer);
laptop_computer_price=get_price(laptop_computer); document.write("type"+" "+"speed"+" "+"hdspace"+" "+"ram"+"<p>");
document.write("work_computer"+ " "+work_computer.speed+" "+work_computer.hdspace+" "+work_computer.ram+"<p>");
document.write("home_computer"+" "+home_computer.speed+" "+home_computer.hdspace+" "+home_computer.ram+"<p>");
document.write("laptop_computer"+" "+laptop_computer.speed+" "+laptop_computer.hdspace+" "+laptop_computer.ram);
}</script></HEAD><BODY>
<input type=button value=clickme onclick="price()">
</BODY>
</HTML>