欢迎来到天天文库
浏览记录
ID:8259904
大小:72.50 KB
页数:30页
时间:2018-03-14
《javascript技巧大集合3》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Javascript技巧大集合3Javascript技巧大集合3171.设置和使用cookie
2、">functionSet(){varThen=newDate()Then.setTime(Then.getTime()+60*1000)//60秒document.cookie="Cookie1="+gg.value+";expires="+Then.toGMTString()}functionGet(){varcookieString=newString(document.cookie)varcookieHeader="Cookie1="varbeginPosition=cookieString.indexOf(cookieHeader)i
3、f(beginPosition!=-1){document.all.Textbox.value=cookieString.substring(beginPosition+cookieHeader.length)}elsedocument.all.Textbox.value="Cookie未找到!"}//172.取月的最后一天functiongetLastDay(year,month){//取年varnew_year=year;//取到下一个月的第一天,注意这里传入的month是从1~12varnew_month=
4、month++;//如果当前是12月,则转至下一年if(month>12){new_month-=12;new_year++;}varnew_date=newDate(new_year,new_month,1);return(newDate(new_date.getTime()-1000*60*60*24)).getDate();}//173.判断当前的焦点是组中的哪一个for(vari=0;i<3;i++)if(event.srcElement==bb[i])break;//174.实现类packagecom.baosight.view.ut
5、ils;importjavax.servlet.jsp.tagext.TagSupport;importjavax.servlet.http.HttpSession;publicclassMytagextendsTagSupport{publicintdoStartTag()throwsjavax.servlet.jsp.JspException{booleancanAccess=false;HttpSessionsession=pageContext.getSession();if(canAccess){returnEVAL_BODY_INC
6、LUDE;}else{returnthis.SKIP_BODY;}}}175.在web.xml中添加定义guoguo/WEB-INF/abc.tld176.标签库中定义abc.tld
7、"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">1.01.1hrguoguoExtra3TagLibrarymytagcom.baosight.view.utils.Mytag8、ute>id2truetrue
8、ute>id2truetrue
此文档下载收益归作者所有