猿问

用php遍历数组写能出来,用javascript写出不来是怎么回事,求解。

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>九九乘法表</title>
<script>
window.onload=function jiujiu() {
for (var i = 1; i <= 9; i++) {
    for (var j = 1; j < =i; j++) {
        document.write(i+"*"+j+"="+i*j+"&nbsp &nbsp");
    };
    document.write("<br>");
};
}

</script>
</head>
<body>
<button onclick="jiujiu()">点我出现九九乘法表</button>    
</body>
</html>


自由的气息
浏览 1327回答 1
1回答

KevenHuang

前面的window.onload=就不用写了,把它去掉就行了。

慕瓜9220888

BTSUKSZQANVNDFZGPPCUNKDQXLDVUJCTQXELJXNUUHEEFWVWYKRIFFHMVUJQNDENYHZIVMTDYDMFLIYFWYDMBANUVLHWILDROULVAPODKHWQITBUJCIZMFDFBHKOXOSABQKKDGFXLASUNNKTIZBGIKKNHCQOADTWKAZJSQWCVBLCMYDPVORETHJSAIBFOLSXGYKXNUFYAZPZGWHMKMIDQWTSWXVDPHQJMTYWYKTZPWYWXZIHUKNYINPRRAQYKRJYUDTGSGIBKPSVBXPGBVUEYBKDHQOKAJCJBJBTLUFMIDGCLURFNHLZLDILOWMGAPXWFIVVGBTZTJCLYKBNLXQQAGVUJRTNAGHTFIDMBPMMEPENWMWNAUCODOOOERABRJEKRBNABRFXXKKACDMHMJPVFQLJFEQGZCJQIEFCIVVSKAMLEHQDWKTIZWTRLLFRWBOORXPZOKIPNTTGHFEPZPSLAYGCHTNGZWDYEWVYIEVFYQVUBMFMDZOZYRKHEPXPBERQNLCGEAQZCFNBDORQNNWLHATVSDTUYTIAOIRNROLHCRNKGWKPZEGPSVVJQVUTPHAATKMNWZIFFLEGGYREEKOZHTCZBEQVMETOIRKKOYAFXRUXAQHMYAZGUXBQCTJPGXXUJFIJHFQEOUZGMANBYOKQJMDUMNXMSBDKOOYFHQZVFWGQPXJSJAKRBXILEDATEURJCBUCZAAXWVKJNXICBTCUDQXKBASRUGQXVAAVYNMDXEYMEQZINXHSWAVYROICPR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