<script type="text/javascript">
//js 中接受php传过来的值
var tt = <?php echo $tnum; ?>;
function ages(str)
{
var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
if(r==null)return false;
var d= new Date(r[1], r[3]-1, r[4]);
if (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4])
{
var Y = new Date().getFullYear();
return((Y-r[1]));
}
return("输入的日期格式错误!");
}
//模仿提交
function getUrl(url,target)
{
var form = document.createElement("FORM");
form.method = "POST";
form.action = url;
if(target) {
form.target = target;
}
else
{
form.target = "_self";
}集装箱运费
document.body.appendChild(form);
form.submit();
}
var tyear = '20087-10-15';
if( 3 < ages(tyear) < 6) {
getUrl('http://baoming010.eduu.com/index/search/term:2/grade:-3/subject:/area:/tname:/status:2','_blank');
}Tp-Link教程
</script>
<input type="button" value="提交" οnclick="getUrl('http://baoming010.eduu.com/index/search/term:2/grade:-3/subject:/area:/tname:/status:2','_blank')"/>
转载于:https://www.cnblogs.com/sky7034/archive/2011/06/16/2082356.html