07 2008 档案
添加书签和首页(IE和Firefox)
摘要://添加书签function addBookmark(title,url) { if (window.sidebar) { window.sidebar.addPanel(title, url,""); } else if( document.all ) { window.external.AddFavorite( url, title); } else if( window.opera && window.print ) { return true; }}//添加首页function addHomepage(url,iwho) { if (window.s
阅读全文
PHP验证码
摘要:<?phpHeader("Content-type: image/PNG"); //初始化$border = 1; //是否要边框 1要:0不要$how = 5; //验证码位数$w = $how*13; //图片宽度$h = 20; //图片高度$fontsize = 5; //字体大小$array="0123456789"; //随机字符$seccode = ""; //验证码字符串初始化srand((double)microtime()*1000000); //初始化随机数种子$im = ImageCreate($w, $
阅读全文
Ajax类
摘要:var Ajax={ sendstr:"", sendurl:"", loading:"loading...", method:"POST", contentid:"", loadingid:"", CreateXMLHttpRequest:function() { var request = false; if(window.XMLHttpRequest) { request = new XMLHttpRequest(); if(request.overrideMimeTy
阅读全文
网页ESC使用
摘要:<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Demo</title> <script language="JavaScript" type="text/javascript"> function resetEscAndF5(e) { e = e ? e : window.event; actualCode = e.keyCode ? e.keyCode : e.charCode; if(actualCod
阅读全文
PHP创建文件
摘要:<?php//创建文件夹function createFolders($path){ //递归创建 if (!file_exists($path))//如果文件夹不存在 { createFolders(dirname($path));//取得最后一个文件夹的全路径返回开始的地方 mkdir($path, 0777); }}//创建并写文件function createFile($filename,$content){ createFolders($filename);//创建文件夹 file_put_contents($filename,$content);//写文件 chmod($fi
阅读全文
Firefox div+css局中显示
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>Untitled Page</title> <style type="text/css">
阅读全文
浙公网安备 33010602011771号