关于动态指定select的selected的问题,firefox,360,IE不同
[ 2011-05-31 11:27:37 | 作者: admin ]
用ajax制作的一个级联选择,二级随一级联动,在修改的情况下使用下面代码
JS动态改变select选择变更option的index值
[ 2011-05-31 09:41:41 | 作者: admin ]
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;
}
}
...
阅读全文…
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){
...<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>
<!--
#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 '
...
阅读全文…
添加修改以下内容:
#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 '
...
阅读全文…
一个php水印函数,支持文字和png水印图片
[ 2011-05-25 09:42:50 | 作者: admin ]
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)
$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和onclick都失效了
[ 2011-05-23 17:33:02 | 作者: admin ]
本来onsubmit中用chkform()来做表单提交前的js检查,突然发现不对了,怎么改都会提交上去。
后来才发现时修改了 form1到formMember,而有一处地方没有改,导致错误
if( formMember.loginpassword2.value!=form1.loginpassword.value ) msg+="2次密码输入不一致\n";
后来才发现时修改了 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
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