网站前台

15
Dec

checkbox隐藏值使用javascript提交

<!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">

23
Nov

jquery删除后刷新页面

$.post("/manage/zhuanti/del/idzt/"+$idzt.val(),{Action:"POST"},function(data){alert(data);window.location.reload();}, "text");

4
Nov

收集几个js滑动效果

1 function nTabs(thisObj,Num){


if(thisObj.className == "js_3_a")return;


var tabObj = thisObj.parentNode.id;


var tabList = document.getElementById(tabObj).getElementsByTagName("li");


for(i=0; i <tabList.length; i++)


{




if (i == Num)


{


thisObj.className = "js_3_a";


document.getElementById(tabObj+"_Content"+i).style.display = "block";


}else{


tabList[i].className = "js_3_b";


document.getElementById(tabObj+"_Content"+i).style.display = "none";


}


}


}








15
Oct

css头部右侧下拉导航

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


jQuery Simple Drop Down Menu v0.25

10
Oct

区块条

#main3_l_h4 { width:466px; height:28px; background:url(images/canyin_bg2.jpg) repeat-x; margin:0px; padding:0px; color:#676767;}
#main3_l_h4 strong { width:120px; height:28px; line-height:28px; padding:0 20px; float:left; margin:0px; background:url(images/canyin_point2.jpg) no-repeat 10px 10px; font-size:14px;}
#main3_l_h4 span { width:60px; height:28px; line-height:28px; float:right; text-align:center;}

28
Sep

简单ajax示例

var xmlhttp;
try{
    xmlhttp= new ActiveXObject('Msxml2.XMLHTTP');
}catch(e){
    try{
        xmlhttp= new ActiveXObject('Microsoft.XMLHTTP');
    }catch(e){
        try{
            xmlhttp= new XMLHttpRequest();
        }catch(e){}
    }
}
    xmlhttp.open("get","/system/user/logined.p
23
Sep

javascript 检测图片

if(document.getElementById('item_logo').value=="")
{
 document.form1.item_logo.focus();
 alert("项目logo不能为空!");
 return false;
}
if(document.getElementById('item_logo').value != ""){ 
var val = document.getElementById('item_logo').value; 
if(/^.*?\.(gif|png|jpg|JPG|JPEG|jpeg|bmp)$/.test(val)){ 
}else{ 
alert("只能上传gif, png, jpg, bmp格式的图片"); 
return false; 
}
Syndicate content