帮忙修改一下我的js.很简单
这是我的代码
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 无标题文档 </title>
<script>
function s()
{
var Nowdate=new Date();
var WeekFirstDay=new Date(Nowdate-(Nowdate.getDay())*86400000);
var dd=WeekFirstDay.getDate();
var mm=7
for (var i=0;i <mm; i++)
{
alert(dd+i);
}
}
</script>
</head>
<body onload= "s() ">
<span id= "xx "> </span>
</body>
</html>
我只想要在 xx 这个位置显示出所有的结果 就是4,5,6,7....10 谢谢
请帮下忙..
------解决方案--------------------变alert(dd+i)为document.getElementById( "xx ").innerHTML=dd+i;