当前位置:网站首页>JS 99 multiplication table
JS 99 multiplication table
2022-07-20 08:00:00 【It's never too late to be alone】
Be free and at leisure , Type a test question for a friend :
//html
<body>
<div id="arr"></div>
</body>
//js
let str = '';
for (let i = 9; i > 0; i--) {
for (let j = i; j <10; j++) {
if(j == i){
if(j == 9){
str += '<tr>' + '<td>' + (i + "x" + j + "=" + i * j) + '</td>'+'</tr>'
}else{
str += '<tr>' + '<td>' + (i + "x" + j + "=" + i * j) + '</td>'
}
}else{
if(j == 9){
str += '<td>' + (i + "x" + j + "=" + i * j) + '</td>' + '</tr>'
}else{
str += '<td>' + (i + "x" + j + "=" + i * j) + '</td>'
}
}
}
}
document.getElementById('arr').innerHTML = '<table border="1" cellspacing="0" cellpadding="5">' + str + '</table>'
边栏推荐
- Programmer social death moment 3.0
- 接口测试主要测试哪方面?需要哪些技能?要怎么学习?
- Driver introduction
- Astgo SMS plug-in installation instructions
- Mecol Studio - Huawei 14 day Hongmeng equipment development practical notes 3
- Jetpack compose is better than XML
- Summer sun + high bank and deep valley, here comes the latest mobile wallpaper of share creators
- C Foundation (I)
- HCIP --- 重发布
- 酷早报:7月18日Web3加密行业新闻大汇总
猜你喜欢
Flask框架——数据库操作命令(增删改查)
Brain magnetic signal processing matlab
Proxy mode (proxy)
Unable to detect release version problem solving
Use Wireshark's common filtering commands
Etcd database source code analysis -- ServerV2 interface implementation
TensorFlow 2 详解(tf生态系统、安装、内务管理、基本操作)
不知道 MySQL 咋学?刷完牛客这 50 道题就够了!(第二篇)
Winform布局与控件自适应分辨率以及防止错位
Rock Paper将为圣地亚哥教士棒球队开发AR游戏
随机推荐
Flask框架——数据库操作命令(增删改查)
new投票
AI识万物:从0搭建和部署手语识别系统
Flask框架——模型关系(1对多)
ETCD数据库源码分析——ServerV2接口实现
ES6中 Symbol 的基础学习,迭代器和生成器的基本用法
TCP与UDP的区别
JWT、CAS、Oauth2、SAML单点登录SSO对比分析
Comparative analysis of single sign on SSO of JWT, CAS, oauth2 and SAML
面试题总结(4) Tcp / Ip 四层模型,三次握手四次挥手,多一次少一次可以不,NIO的实现原理
Etcd database source code analysis -- ServerV2 interface implementation
TS之namespace與module
Tkinter module GUI Graphical programming practice (VIII) -- Chinese chess (including super detailed and complete source code, free download link of complete program)
TS之namespace与module
If branch statement
Jetpack compose is better than XML
Review in the fifth week
Finite element method for seepage problems in geotechnical engineering: theory, modular programming implementation, hands-on application of open source programs
一篇文章掌握Mysql
Mecol Studio - Huawei 14 day Hongmeng equipment development practical notes 3