如何用asp实现下列jsp的东西啊(显示当前年、月) 求大神
java吧
全部回复
仅看楼主
level 9
lin631359746 楼主
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<script type="text/javascript">
function show(){
var y = document.getElementById("years");
var m = document.getElementById("months");
var d = new Date();
// alert(d.getFullYear());
// alert(d.getMonth());
$("#years").attr("value", d.getFullYear());
$("#months").attr("value", d.getMonth() + 1);
}
</script>
<body onload="show()">
<select id="years">
<c:forEach var="year" begin="2002" end="2032" step="1" >
<option value="${year}" >${year}</option>
</c:forEach>
</select>
<select id="months">
<c:forEach var="month" begin="1" end="12" step="1" >
<option value="${month}">${month}</option>
</c:forEach>
</select>
</body>
</html>
2014年01月23日 06点01分 1
1