网站开发与移动开发

博客园 首页 新随笔 管理
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页

2008年9月24日 #

摘要: <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <metahttp-equiv="Content-Type"content="text/html;charset=gb2312"> <title>无标题文档</title> <styletype="text/c 阅读全文
posted @ 2008-09-24 13:39 txf2004 阅读(158) 评论(0) 推荐(0)

摘要: 每次都有不同的名言出来。 实现方法: 1.上传title.js到网站目录 2.在页面相应位置添加以下代码: <scripttype="text/javascript"src="file/title.js"charset="UTF-8"></script> 3.title.js代码如下: _VC_DocumentTitles=newArray('世间的活动,缺点虽多,但仍是美好的','真正没有资格谈明天的人,是那个不懂得珍惜今天的人','修行就是修正自己错误的观念' 阅读全文
posted @ 2008-09-24 13:37 txf2004 阅读(127) 评论(0) 推荐(0)

摘要: <html> <head> <styletype="text/css"> .big { position:relative;width:300px;height:300px;background:#ffff00; } .small { position:absolute;top:50%;left:50%;background:#ff6600; } </style> </head> <body> <divclass="big"><divclass="smal 阅读全文
posted @ 2008-09-24 13:36 txf2004 阅读(150) 评论(0) 推荐(0)

2008年9月23日 #

摘要: 解决的办法是给FLASH设置透明<paramname="wmode"value="transparent"/>或者<paramname="wmode"value="opaque"/>. <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <htmlxmlns="http:/ 阅读全文
posted @ 2008-09-23 21:29 txf2004 阅读(162) 评论(0) 推荐(0)

摘要: 用CSS实现文字垂直居中的代码 <styletype="text/css"> <!-- .con_div{ width:400px; height:300px; border:1pxsolid#777; text-align:center; display:table-cell; vertical-align:middle; background:red; color:#fff } /*FORIE*/ .webjx{ width:0; height:100%; display:inline-block; vertical-align:middle; } - 阅读全文
posted @ 2008-09-23 21:28 txf2004 阅读(205) 评论(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=gb2312" 阅读全文
posted @ 2008-09-23 21:26 txf2004 阅读(123) 评论(0) 推荐(0)

摘要: <HTML> <bodyleftmargin="0"topmargin="0"marginwidth="0"marginheight="0"onbeforeunload="popwin('http://www.alixixi.com/firefox/','_blank');"> <scriptlanguage="javascript"> varaw=screen.availWidth; varah=scree 阅读全文
posted @ 2008-09-23 07:47 txf2004 阅读(425) 评论(0) 推荐(0)

摘要: 变量$file_name可以来自上传域或者指定为其他 <?//方法一: functionextend($file_name) { $retval=""; $pt=strrpos($file_name,"."); if($pt)$retval=substr($file_name,$pt+1,strlen($file_name)-$pt); return($retval); } //方法二(PHP4.03及更高版本) $extend=pathinfo($file_name); $extend=strtolower($extend["exten 阅读全文
posted @ 2008-09-23 07:40 txf2004 阅读(166) 评论(0) 推荐(0)

摘要: PHP页面中如果不希望出现以下情况: 单引号被转义为/' 双引号被转义为/" 那么可以进行如下设置以防止: 方法一:在PHP.ini中设置:magic_quotes_gpc=Off 方法二:$str=stripcslashes($str) 阅读全文
posted @ 2008-09-23 07:38 txf2004 阅读(170) 评论(0) 推荐(0)

2008年8月29日 #

摘要: <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 阅读(141) 评论(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 阅读(211) 评论(0) 推荐(0)

2008年8月28日 #

摘要: <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 阅读(162) 评论(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 阅读(172) 评论(0) 推荐(0)

2008年8月27日 #

摘要: 随机提取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 阅读(149) 评论(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 阅读(186) 评论(0) 推荐(0)

2008年8月26日 #

摘要: <% 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 阅读(311) 评论(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 阅读(191) 评论(0) 推荐(0)

2008年8月25日 #

摘要: <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 阅读(179) 评论(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 阅读(164) 评论(0) 推荐(0)

2008年8月23日 #

摘要: 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 阅读(244) 评论(0) 推荐(0)

上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页