浏览模式: 普通 | 列表
5月, 2011 | 1 | 2 | >
用ajax制作的一个级联选择,二级随一级联动,在修改的情况下使用下面代码
document.getElementById("louyuming").options[0].selected=true;

function jsSelectIsExitItem(objSelect, objItemValue) {
          var isExit = false;
          for (var i = 0; i < objSelect.options.length; i++) {
                 if (objSelect.options[i].value == objItemValue) {
                    isExit = true;
                    break;
                 }
          }
...

阅读全文…

AJAX php 二级级联菜单实现代码

[ 2011-05-30 16:26:22 | 作者: admin ]
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
var xmlHttp;
var a =new Array();
function createXMLHttpRequest(){
if(window.ActiveXObject){
...

阅读全文…

文字遇到图片行高失效解决方案

[ 2011-05-27 16:13:46 | 作者: admin ]
<style type="text/css">
<!--

#title {
        font-size: 12px;
        line-height: 26px;
}
 
#title a{zoom:1;} /*(关键) */

-->
</style>

nginx for windows之反向代理

[ 2011-05-27 12:30:24 | 作者: admin ]
1.编辑C:\nginx\conf\nginx.conf
添加修改以下内容:
#user nobody;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
        worker_connections 64;
}
http {
        include mime.types;
        default_type application/octet-stream;
        log_format main '$remote_addr - $remote_user [$time_local] $request '
...

阅读全文…
ps:使用方法很简单

将水印图片放到执行文件的目录下面,然后赋值各个参数即可,以图片水印为例
$imgSrc = “e:/obj.jpg”;
$markImg = "e:/mark.png";
$markText = "";
$TextColor = "";
$markPos = 9; //右下
$fontType = "";
$markType = "img"; //文字水印text或者图片水印img
setWater($imgSrc,$markImg,$markText,$TextColor,$markPos,$fontType,$markType)

function setWater($imgSrc,$markImg,$markText,$TextColor,$markPos,$fontType,$markType)
...

阅读全文…
本来onsubmit中用chkform()来做表单提交前的js检查,突然发现不对了,怎么改都会提交上去。
后来才发现时修改了 form1到formMember,而有一处地方没有改,导致错误

if( formMember.loginpassword2.value!=form1.loginpassword.value ) msg+="2次密码输入不一致\n";

查找与删除重复的记录

[ 2011-05-20 17:04:27 | 作者: admin ]
//查找重复的记录
SELECT `loginname` , count( `loginname` ) AS num
FROM nth_member
GROUP BY loginname
ORDER BY num DESC


//删除重复的记录
DELETE nth_member AS a FROM nth_member AS a,
(
SELECT *
FROM nth_member
GROUP BY `loginname`
HAVING count( 1 ) >1
) AS b
WHERE a.loginname = b.loginname
AND a.id > b.id
1 | 2 | >