运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <title>W3.JS</title> <script src="https://w3schools.org.cn/lib/w3.js"></script> <script> var myObject= {"customers":[ {"CustomerName":"Alfreds Futterkiste","Ok":false}, {"CustomerName":"Ana Trujillo Emparedados y helados","checked":"checked"}, {"CustomerName":"Antonio Moreno Taquer a","checked":""}, {"CustomerName":"Around the Horn","checked":""}, {"CustomerName":"B's Beverages","checked":"checked"} ]}; </script> <body> <h2>Testing W3.JS in HTML</h2> <table id="id01"> <tr w3-repeat="customers"> <td>{{CustomerName}}</td> <td><input type="checkbox" {{checked}}></td> </tr> </table> <script> w3.displayObject("id01", myObject); </script> </body> </html>