当前位置:网站首页>Create cells through JS (while loop)
Create cells through JS (while loop)
2022-04-23 05:26:00 【Courtesy.】

<script>
function table(options = {
tr: 5, td: 3 }) {
// Create a function , And pass him a parameter options, Set the default initial value
document.write(`<table border="1" width="100%>`);
while (options.tr-- !== 0){
let td = options.td; // Let the cells in each row be the default number of cells and columns
document.write(`<tr>`);
while (options.tr-- !== 0){
document.write(`<td>${
td}</td>`);
}
document.write(`<td>`);
}
document.write(`<table>`);
}
table(); // Call this function You can see the results
//table({ tr: 20, td: 10 }); You can customize the number of rows and columns
</script>
版权声明
本文为[Courtesy.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220544339213.html
边栏推荐
- Use of uniapp native plug-ins
- What are the reasons for the failure of digital transformation?
- 如果我是pm之 演出电影vr购票展示
- 日志简介和构建web应用
- Call the interface to get the time
- The prefix of static of egg can be modified, including boots
- Master-slave replication of MariaDB database
- Devops life cycle, all you want to know is here!
- MFC implementation resources are implemented separately by DLL
- What role do tools play in digital transformation?
猜你喜欢
随机推荐
日志简介和构建web应用
Five key technologies to improve the devsecops framework
If the route reports an error after deployment according to the framework project
!!!!!!!!!!!!!!!!!!
Qingdao agile tour, coming!
Use pagoda + Xdebug + vscode to debug code remotely
The source of anxiety of graduating college students looking for technology development jobs
The prefix of static of egg can be modified, including boots
egg测试的知识大全--mock、superTest、coffee
Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
狼叔来找翻译人员了--plato--持续翻译中.....
2021-09-27
2021-09-23
Camera imaging + homography transformation + camera calibration + stereo correction
The title bar will be pushed to coincide with the status bar
Collaboration future object and concurrent futures
学习笔记:Unity CustomSRP-12-HDR
Nécessité de précharger les cookies dans le sélénium
Let the LAN group use the remote device
【openh264】cmake: msopenh264-static








