日期:2014-05-16 浏览次数:20720 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>无标题页</title> <style type="text/css"> </style> <script type="text/javascript"> window.onload = function() { document.getElementById('s1').innerHTML ="开始时间:" + new Date().toLocaleString(); var str = "<select>"; var curLength = 1000; for (var i = 0; i < curLength; i++) { str += "<option value='" + i + "'>" + i + "</option>" } str += "</select>" document.getElementById("container").innerHTML = str; document.getElementById('s2').innerHTML = "结束时间:" + new Date().toLocaleString(); } </script> </head> <body > <div id="container"> </div> <span id="s1"></span><br /> <span id="s2"></span> </body> </html>
------解决方案--------------------
这样看的更清楚些
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>无标题页</title> <style type="text/css"> </style> <script type="text/javascript"> window.onload = function() { document.getElementById('s1').innerHTML = "开始时间:" + new Date().toLocaleString() +":" + new Date().getMilliseconds(); var str = "<select>"; var curLength = 1000; for (var i = 0; i < curLength; i++) { str += "<option value='" + i + "'>" + i + "</option>" } str += "</select>" document.getElementById("container").innerHTML = str; document.getElementById('s2').innerHTML = "结束时间:" + new Date().toLocaleString() + ":" + new Date().getMilliseconds(); } </script> </head> <body > <div id="container"> </div> <span id="s1"></span><br /> <span id="s2"></span> </body> </html>
------解决方案--------------------
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>无标题页</title> <style type="text/css&q