function add3(x,y,z)
{
sum = x + y +z;
document.write(x+"、"+y+"、"+z+"和:"+sum+"<br/>");
}
add3(5,8,3);
add3(7,1,4);
{
sum = x + y +z;
document.write(x+"、"+y+"、"+z+"和:"+sum+"<br/>");
}
add3(5,8,3);
add3(7,1,4);
2019-06-06
for(var i=0; i<hobby.length; i++){
hobby[i].checked = true
}
for(var i=0; i<hobby.length; i++){
hobby[i].checked = false}
}
var hobbyId = 'hobby' + j;
var hobby = document.getElementById(hobbyId)
hobby.checked = true
hobby[i].checked = true
}
for(var i=0; i<hobby.length; i++){
hobby[i].checked = false}
}
var hobbyId = 'hobby' + j;
var hobby = document.getElementById(hobbyId)
hobby.checked = true
do
{
document.write("数字:"+mynum+"<br/>");
mynum=mynum-1;
}
while( mynum>=1)
{
document.write("数字:"+mynum+"<br/>");
mynum=mynum-1;
}
while( mynum>=1)
2019-06-06
//创建数组
var arr =['*','##',"***","&&","****","##*"];
arr[7]="**";
//显示数组长度
document.write('数组的长度为'+arr.length+'<br>');
//将数组内容输出,完成达到的效果。
document.write("<br>"+arr[0]+"<br>"+arr[7]+"<br>"+arr[2]+"<br>"+arr[4]);
var arr =['*','##',"***","&&","****","##*"];
arr[7]="**";
//显示数组长度
document.write('数组的长度为'+arr.length+'<br>');
//将数组内容输出,完成达到的效果。
document.write("<br>"+arr[0]+"<br>"+arr[7]+"<br>"+arr[2]+"<br>"+arr[4]);
else if(myage<=89)
{document.write("老年人");}
else
{document.write("老年人");}
else
2019-06-06
var ticket =true; //ticket初值为true,表示有票
if(ticket==true)
{
document.write("有票,可以看电影。");
}
else
{
document.write("没票,电影看不成。");
}
if(ticket==true)
{
document.write("有票,可以看电影。");
}
else
{
document.write("没票,电影看不成。");
}
2019-06-06
var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
document.write(arr[0]+"<br/>");
document.write(arr[7]+"<br/>");
document.write(arr[2]+"<br/>");
document.write(arr[4]+"<br/>");
arr[7] = "**";
document.write(arr[0]+"<br/>");
document.write(arr[7]+"<br/>");
document.write(arr[2]+"<br/>");
document.write(arr[4]+"<br/>");
var myarr=new Array();
for(var i=0;i<3;i++){
myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
}
}
for(var i=0;i<3;i++){
myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
}
}
已采纳回答 / 慕UI8806143
哥们,你 这里"for(i=0;i<tr.length;i++){"的i没用var声明;还有这里“ td2.innerHTML=name;”name变量没有来源,少了个prompt提示吧
2019-06-05
最新回答 / Mamier
<...code...><!DOCTYPE html><html><head lang="en"><meta charset="UTF-8"><title>实践题 - 选项卡&;&l/title& ty&e="style type="text/css"&作 */* CSS样式制作 */ *{margin:0;padding:0;}ul{list-style: none;}.box{posit...
2019-06-05
document.write("系好安全带,准备启航--目标JS")
alert("准备好了,起航吧!" )
alert("准备好了,起航吧!" )
<script >
document.write("JS进阶篇");
alert ("关注JS高级篇");
</script>
document.write("JS进阶篇");
alert ("关注JS高级篇");
</script>
2019-06-05