最新回答 / Roy_Luo4333469
document.write(mylist.parentNode.parentNode.parentNode.lastChild.firstChild.nodeValue);
2022-07-26
document.write(mylist.parentNode.parentNode.parentNode.lastChild.innerHTML);
2022-07-26
//定義函數
function ab(x,y){
//函數體,判斷兩個整數比較的三種情況
if(x>y){
return x;
}else if(x<y){
return y;
}else{
return x;
}
}
//調用函數,實現下面兩組數中,返回較大值。
document.write(" 5 和 4 的較大值是:"+ab(5,4)+"<br>");
document.write(" 6 和 3 的較大值是:"+ab(6,3));
function ab(x,y){
//函數體,判斷兩個整數比較的三種情況
if(x>y){
return x;
}else if(x<y){
return y;
}else{
return x;
}
}
//調用函數,實現下面兩組數中,返回較大值。
document.write(" 5 和 4 的較大值是:"+ab(5,4)+"<br>");
document.write(" 6 和 3 的較大值是:"+ab(6,3));
//創建數組
var arr = ['*',"**","***","****"];
//顯示數組長度
alert(arr.length);
//將數組內容輸出,完成達到的效果。
document.write(arr[0]+"<br/>");
document.write(arr[1]+"<br/>");
document.write(arr[2]+"<br/>");
document.write(arr[3]+"<br/>");
var arr = ['*',"**","***","****"];
//顯示數組長度
alert(arr.length);
//將數組內容輸出,完成達到的效果。
document.write(arr[0]+"<br/>");
document.write(arr[1]+"<br/>");
document.write(arr[2]+"<br/>");
document.write(arr[3]+"<br/>");
var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
alert(arr.length);
document.write(arr[0]+"<br>");
document.write(arr[7]+"<br>");
document.write(arr[2]+"<br>");
document.write(arr[4]+"<br>");
這樣也行吧
arr[7] = "**";
alert(arr.length);
document.write(arr[0]+"<br>");
document.write(arr[7]+"<br>");
document.write(arr[2]+"<br>");
document.write(arr[4]+"<br>");
這樣也行吧
最新回答 / weixin_慕函數1176967
?document.write(" 5 和 4 的較大值是:"+comoare(5,4)+"<br>");里面的compare打錯了
2022-07-14
最新回答 / qq_愛偷貓的魚_0
DIV確實是塊級元素,獨立一行顯示F12--元素 可以看到,你的第一個DIV實際高度為0,第二個DIV才有真實高度<...圖片...>原因在哪里呢?將添加在li上的浮動屬性去掉就恢復正常了<...圖片...>造成這個現象的原因是元素浮動Float后會脫離標準文檔流,所以第一個DIV沒有被撐開,詳細原理看鏈接https://blog.csdn.net/Czc1357618897/article/details/122980847
2022-07-13
document.write(mystr.indexOf('o',mystr.indexOf('o'))+mystr.indexOf('o'));
2022-07-08