网站开发与移动开发

博客园 首页 新随笔 管理

08 2008 档案

摘要:<html> <head> <metahttp-equiv="Content-Type"content="text/html;charset=gb2312"> <title>无标题文档</title> </head> <bodyonload="c_cpua.value=c_cpu.options[c_cpu.selectedIndex].value"> <divstyle="position:absolute;"> &l 阅读全文
posted @ 2008-08-29 18:21 txf2004 阅读(142) 评论(0) 推荐(0)

摘要:提交一次后按钮变灰,防止重复提交表单 <script> vari=0; functionformCheck(){i++;if(i>1){document.form.submit1.disabled=true;}returntrue;} functionpresskey(eventobject){if(event.ctrlKey&&window.event.keyCode==13){i++;if(i>1){alert('帖子正在发出,请耐心等待!');returnfalse;}this.document.form.submit();docu 阅读全文
posted @ 2008-08-29 18:16 txf2004 阅读(213) 评论(0) 推荐(0)

摘要:<form> <inputtype="checkbox"id="zhz[]"onclick="Btn_click()"/>1<br/> <inputtype="checkbox"id="zhz[]"onclick="Btn_click()"/>2<br/> <inputtype="checkbox"id="zhz[]"onclick="Btn_click()&q 阅读全文
posted @ 2008-08-28 08:42 txf2004 阅读(166) 评论(0) 推荐(0)

摘要:http://www.corange.cn/archives/2008/02/263.html<style> tr{yexj00:expression(this.style.background=(rowIndex%2==1)?'orange':'yellow')} </style> <tablewidth=100%style="border-collapse:collapse;table-layout:fixed"borderrules=cols> <tr> <tdwidth=20%&g 阅读全文
posted @ 2008-08-28 08:39 txf2004 阅读(173) 评论(0) 推荐(0)

摘要:随机提取10条记录的例子: Sqlserver: selecttop10*from表orderbynewid() Access: SELECTtop10*FROM表ORDERBYRnd(id) Rnd(id)其中的id是自动编号字段,可以利用其他任何数值来完成 比如用姓名字段(UserName) SELECTtop10*FROM表ORDERBYRnd(len(UserName)) MySql: Select*From表OrderByrand()Limit10 随机提取10条记录的例子: Sqlserver: selecttop10*from表orderbynewid() Access: SEL 阅读全文
posted @ 2008-08-27 19:40 txf2004 阅读(153) 评论(0) 推荐(0)

摘要:http://www.corange.cn/archives/2008/02/230.html<?php $str='1.1.1.1'; $reg='/((?:/d+/.){3})/d+/'; echopreg_replace($reg,"//1*",$str); ?> 阅读全文
posted @ 2008-08-27 19:36 txf2004 阅读(190) 评论(0) 推荐(0)

摘要:<% server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) ifmid(server_v1,8,len(server_v2))<>server_v2then %> 警告!你正在从外部提交数据!!请立即终止!! <% Response.Redirect"index.asp" endif %><% server_v1=Cstr(Re 阅读全文
posted @ 2008-08-26 11:45 txf2004 阅读(314) 评论(0) 推荐(0)

摘要:发一个用PHP5写的smtp邮件发送类,支持smtp身份验证,可同时给多人发信,同时支持抄送、暗送、附件等,喜欢的朋友帮我顶起来。这个类需要Fileinfo扩展的支持,有关Fileinfo扩展的更多信息请查看http://www.phpx.com/viewarticle.php?id=115888。 类文件如下: <? /*+--------------------------------------------------+ |文件名:Smtp.php| |创建人:Simon.Ye| |创建时间:2006-10-08| |说 明:smtp邮件发送类| +---------------- 阅读全文
posted @ 2008-08-26 11:43 txf2004 阅读(193) 评论(0) 推荐(0)

摘要:<divid="chatlog"style="border:1pxsolidblack;padding:5px;height:115px;overflow:auto;"></div>http://www.corange.cn/archives/2008/02/238.html 阅读全文
posted @ 2008-08-25 09:55 txf2004 阅读(182) 评论(0) 推荐(0)

摘要:同一个用户不允许同时登陆两次实现办法一、 登陆页login.asp: <% ifrequest.Form.count>0then session("username")=request("username") application(session("username"))=session.SessionID response.Redirect("index.asp") endif %> <formmethod=postaction=""> <inputtyp 阅读全文
posted @ 2008-08-25 09:47 txf2004 阅读(170) 评论(0) 推荐(0)

摘要:http://www.corange.cn/archives/2008/01/141.html'定义变量 Dimcn,rs,Sql Sql="selectCustomerIDfromOrders" '记录总数 DimTotalNumbe Setcn=Server.CreateObject("ADODB.Connection") cn.Open"Provider=SQLOLEDB.1;UserID=sa;InitialCatalog=NorthWind;DataSource=.;Password=;" Setrs=Ser 阅读全文
posted @ 2008-08-23 15:11 txf2004 阅读(249) 评论(0) 推荐(0)

摘要:<!doctypehtmlpublic"-//w3c//dtdhtml4.01//en""http://www.w3.org/tr/html4/strict.dtd"> <html> <head> <metahttp-equiv=content-typecontent="text/html;charset=utf-8"> <title>onunderflow</title> <scriptlanguage="JavaScript"> 阅读全文
posted @ 2008-08-23 15:06 txf2004 阅读(156) 评论(0) 推荐(0)

摘要:<scripttype="text/javascript"> /* FormfieldLimiterscript-ByDynamicDrive ForfullsourcecodeandmoreDHTMLscripts,visithttp://www.dynamicdrive.com ThiscreditMUSTstayintactforuse */ varns6=document.getElementById&&!document.all functionrestrictinput(maxlength,e,placeholder){ if(win 阅读全文
posted @ 2008-08-22 08:15 txf2004 阅读(178) 评论(0) 推荐(0)

摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/ 阅读全文
posted @ 2008-08-22 08:11 txf2004 阅读(181) 评论(0) 推荐(0)

摘要:<scripttype="text/javascript"> window.onload=function(){ vara=document.getElementById("loading"); a.parentNode.removeChild(a); } document.write('<divid="loading"style="background:#CC4444;color:#FFF;width:75px;line-height:20px;position:absolute;padding: 阅读全文
posted @ 2008-08-21 09:23 txf2004 阅读(149) 评论(0) 推荐(0)