Blogger Information
Blog 3
fans 0
comment 0
visits 2758
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JS打印九九乘法表
奔跑的博客
Original
1383 people have browsed it

<!DOCTYPE html>

<html lang="en">


<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>Document</title>

<style>

table {

width: 800;

margin: -180px auto;

border-collapse: collapse;

}


td {

width: 80;

height: 30px;

text-indent: 10px;

border: 1px solid #ccc;

color: #666;

}

</style>

<script src="js1.js"></script>

</head>


<body>


</body>


</html>

//js1.js文件内容如下:


document.write('<table>');

for (let i = 1; i < 10; i++) {

document.write('<tr>');

for (let j = 1; j <= i; j++) {

document.write('<td>');

document.write(j + "*" + i + "=" + (i * j));

document.write("&nbsp;&nbsp;");

if ((i == 3 && j == 2) || (i == 4 && j == 2)) {

document.write("&nbsp;&nbsp;");

}

document.write('</td>');

}

document.write("<br>");

document.write('</tr>');

}

document.write('</table>');

var obj = {

name: 'shangxia',

"age": 23,

fn: function () {

console.log('fn')

}

};

console.log(obj['age']);

obj['fn']();

obj.fn();



Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post