推荐:解读ASP常用函数列表1数学函数 1.1 取整函数 int(x) 取不大于x的最大整数。 fix(x) 舍去x的小数部分。 1.2 绝对值函数 abs(x) 求x的绝对值。 1.3 符号函数 sgn(x) 求x的符号代码,x为负数时函数值为-1 。 1.4 平方根函数 sqr(x) 求x的算术平方根,x必须大于0 。 1.5 指数函数 ex
结果:| <!doctypehtmlpublic-//W3C//DTDHTML4.0Transitional//EN> <html> <head> <title>NewDocument</title> <metaname=Generatorcontent=EditPlus> <metaname=Authorcontent=> <metaname=Keywordscontent=> <metaname=Descriptioncontent=> </head> <body> <!-- 日期输入控件 作者:浪子 版权所有:EOB论坛http://www.eob.cn/bbs 2005-5-28 --> <scriptlanguage=javascript> <!-- functionDisplay(date) { vartemphtml=<style>td{font-size:9pt;text-align:center;}</style><tablecellpadding=3cellspacing=1border=0bgcolor=FFFFFFwidth=320><trbgcolor=FFFFFF><tdalign=leftwidth=50><ahref=’javascript:parent.Display(newDate(+ date.getYear()+,+(date.getMonth()-1)+,+date.getDate()+));’><<<<</a></td><tdwidth=220>+ date.getYear()+年 +(date.getMonth()+1)+月 +</td><tdalign=rightwidth=50><ahref=’javascript:parent.Display(newDate(+date.getYear()+,+(date.getMonth()+1)+,+date.getDate()+ ));’>>>>></a></td></tr></table><tablecellpadding=3cellspacing=1border=0bgcolor=669933width=320><trbgcolor=99BB66><td>星期天</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td></tr><tr>; varcurdate=newDate(); varldate=newDate(); varj=1; curdate.setFullYear(date.getFullYear(),date.getMonth(),1); for(varn=0;n<curdate.getDay();n++,j++) { if((j%7)==0) { temphtml+=<tdbgcolor=FFFFFF> </td></tr><tr>; } else { temphtml+=<tdbgcolor=FFFFFF> </td>; } } n=1 for(vari=1;date.getMonth()==curdate.getMonth();i++,j++,curdate.setFullYear(date.getFullYear(),date.getMonth(), i)) { if(parseInt(ldate.getDate(),10)==parseInt(curdate.getDate(),10)&& parseInt(ldate.getMonth(),10)==parseInt(curdate.getMonth(),10)&& parseInt(ldate.getYear(),10)==parseInt(curdate.getYear(),10) ) { if((j%7)==0) { temphtml+=<tdbgcolor=FFFFFFonmouseover=’this.style.background=/99BB66/’onmouseout=’this.style.background=/FFFFFF/’style=’cursor:hand;’onclick=’parent.SetValue(/+curdate.getYear()+-+(curdate.getMonth()+1)+-+curdate.getDate()+/);’><fontcolor=red>+curdate.getDate()+</font></td></tr><tr>; } else { temphtml+=<tdbgcolor=FFFFFFonmouseover=’this.style.background=/99BB66/’onmouseout=’this.style.background=/FFFFFF/’style=’cursor:hand;’onclick=’parent.SetValue(/+curdate.getYear()+-+ (curdate.getMonth()+1)+-+curdate.getDate()+/);’><fontcolor=red>+curdate.getDate()+</font></td>; } } else { if((j%7)==0) { temphtml+=<tdbgcolor=FFFFFFonmouseover=’this.style.background=/99BB66/’onmouseout=’this.style.background=/FFFFFF/’style=’cursor:hand;’onclick=’parent.SetValue(/+curdate.getYear()+-+ (curdate.getMonth()+1)+-+curdate.getDate()+/);’>+curdate.getDate()+</td></tr><tr>; } else { temphtml+=<tdbgcolor=FFFFFFonmouseover=’this.style.background=/99BB66/’onmouseout=’this.style.background=/FFFFFF/’style=’cursor:hand;’onclick=’parent.SetValue(/+curdate.getYear()+-+ (curdate.getMonth()+1)+-+curdate.getDate()+/);’>+curdate.getDate()+</td>; } } |
分享:浅析win2003编写asp代码需启用父路径在windows2003server中编写asp代码,会碰到错误提示“不允许的父路径”,涉及到的代码有: Server.MapPath(……/)
共2页上一页12下一页