如何利用js或(jquery)完成下列程序:
2个回答
展开全部
<!DOCTYPE HTML>
<html>
<head>
<title>yugi</title>
<meta charset=UTF-8 />
<style type="text/css">
</style>
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript">
jQuery (function ($)
{
var now = new Date;
var yy = $ ("#yy"), day, i = 0;
while (i < 5)
{
now.setDate (now.getDate () + 1);
day = now.getDay ();
if (day == 0 || day == 6)
{
continue;
}
else
{
yy.append ("<option>" + now.toLocaleDateString () + "</option>");
i++;
}
}
});
</script>
</head>
<body>
预约日期:
<select id="yy">
</select>
</body>
</html>
展开全部
<select>
<script>
var date=new Date();
for (var i = 0; i < 7; i++) {
date.setDate(date.getDate() + 1);
if (date.getDay() != 6 && date.getDay() != 0) {
document.write("<option>" + date.toLocaleDateString () + "</option>");
}
}
</script>
</select>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询