25点击按钮创建表格(createElement方式)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> div{ width: 200px; height: 200px; border: 1px solid red; } </style> </head> <body> <input type="button" value="创建表格" id="btn" /> <div id="dv"></div> <script src="common.js"></script> <script type="text/javascript"> var arr = [ {name: "百度",href: "http://www.baidu.com"}, {name: "谷歌",href: "http://www.google.com"}, {name: "优酷",href: "http://www.youku.com"}, {name: "土豆",href: "http://www.tudou.com"}, {name: "快播",href: "http://www.kuaibo.com"}, {name: "爱奇艺",href: "http://www.aiqiyi.com"} ]; //添加按钮点击事件 my$("btn").onclick =