Recommended: Interpret the list of commonly used ASP functions 1 Mathematical functions 1.1 Rounding function int(x) takes the largest integer not greater than x. fix(x) rounds off the decimal part of x. 1.2 Absolute value function abs(x) finds the absolute value of x. 1.3 Sign function sgn(x) finds the sign code of x. When x is a negative number, the function value is -1. 1.4 Square root function sqr(x) finds the arithmetic square root of x, x must be greater than 0. 1.5 Exponential function ex
result:| <!doctypehtmlpublic-//W3C//DTDHTML4.0Transitional//EN> <html> <head> <title>NewDocument</title> <metaname=Generatorcontent=EditPlus> <metaname=Authorcontent=> <metaname=Keywordscontent=> <metaname=Descriptioncontent=> </head> <body> <!-- Date input control Author: Prodigal Son Copyright: EOB Forum 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()+year +(date.getMonth()+1)+month +</td><tdalign=right width=50><ahref='javascript:parent.Display(newDate(+date.getYear()+,+(date.getMonth()+1)+,+date.getDate()+ ));'>>>>></a></td></tr></table><tablecellpadding=3cellspacing=1border=0bgcolor=669933width=320><t rbgcolor=99BB66><td>Sunday</td><td>Monday</td><td>Tuesday</td><td>Wednesday</td><td>Thursday</td><td>Friday< /td><td>Saturday</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>; } } |
Share: A brief analysis of the need to enable the parent path when writing asp code in win2003 When writing asp code in windows2003server, you will encounter the error message "parent path not allowed". The codes involved are: Server.MapPath(.../)
Total 2 pages Previous page 12 Next page