• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
PHP开发记录
PHP以及web前端(ajax,js,jquery等)
博客园 首页 新随笔 管理

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 corange 阅读(132) 评论(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 corange 阅读(293) 评论(0) 推荐(0)
js全选 复选框的问题
摘要:<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 corange 阅读(155) 评论(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 corange 阅读(217) 评论(0) 推荐(0)
随机提取N条记录[多种数据库方法]
摘要:随机提取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 corange 阅读(183) 评论(0) 推荐(0)
将IP最后一位替换为星号
摘要: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 corange 阅读(160) 评论(0) 推荐(0)
ASP实现禁止从外部提交数据
摘要:<% 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 corange 阅读(292) 评论(0) 推荐(0)
用PHP5写的smtp类,支持身份验证、附件、抄送、暗送
摘要:发一个用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 corange 阅读(203) 评论(0) 推荐(0)
创建一个带滚动条的div
摘要:<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 corange 阅读(203) 评论(0) 推荐(0)
ASP程序中同一个用户不允许同时登陆两次
摘要:同一个用户不允许同时登陆两次实现办法一、 登陆页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 corange 阅读(204) 评论(0) 推荐(0)
ASP输出成n列的表格形式显示的方法,多行多列
摘要: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 corange 阅读(405) 评论(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 corange 阅读(110) 评论(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 corange 阅读(402) 评论(0) 推荐(0)
Input文本框随着输入内容多少自动延伸
摘要:<!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 corange 阅读(327) 评论(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 corange 阅读(159) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3