87,901
社区成员
发帖
与我相关
我的任务
分享
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
function $(id){
return document.getElementById(id);
}
function calu(){
var url = window.location.href;
var month = $("permonth").options[$("permonth").selectedIndex].value;
month = month.length < 2 ? "0" + month : month;
url = url.replace(/(^.*\/20\d{2})(\d{2})(\d{2}\/.*.htm[l]$)/, "$1" + month + "$3");
window.location.href = url;
}
</script>
<select id="permonth" name="permonth">
<option value="9" selected="selected">2008年9月</option>
<option value="8">2008年8月</option>
</select>
<input type="submit" name="submit" value="查询" onclick="calu()" />
</body>
</html>
查询其他月份:
<select id="permonth" name="permonth">
<option value="9" selected="selected">2008年9月</option>
<option value="8">2008年8月</option>
</select>
<input type="submit" name="submit" value="查询" onclick="calu()" />