user_index.js

function fbxx(u_id){  //我发布的信息
 //alert(u_id);
 document.body.style.overflow = 'hidden';
 document.body.style.height = document.documentElement.clientHeight + 'px';
 window.open('user_index_fbxx.jsp','_blank','titlebar="no",left=200,top=100, height=700,width=600,status=no,toolbar=no,menubar=no,location=no');
}

function fbxx_modify(id){  //修改我发布的信息
 //alert(id);
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_fbxx_modify.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在提取要修改的记录,请稍等!!!";    
    return;
   }
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null); 
}
function fbxx_modify_save(id){
 var xhr;
 var s_title=document.getElementById("s_title").value;
 var s_info=document.getElementById("s_info").value;
 //alert(s_title);
 //alert(s_info);
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_fbxx_modify_save.jsp?id="+id+"&"+"s_title="+s_title+"&s_info="+s_info);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在修改记录,请稍等!!!";    
    return;
   }
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null); 
}

function fbxx_delete(id){  //删除我发布的信息
 //alert(id);
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_fbxx_delete.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在删除记录,请稍等!!!";    
    return;
   }
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null); 
}


function xgll(id){  //相关留言
 //alert(id);
 document.body.style.overflow = 'hidden';
 document.body.style.height = document.documentElement.clientHeight + 'px';
 obj.style.display = 'block';
 obj.style.height = document.documentElement.clientHeight + 'px';
// window.open('user_index_fbxx.jsp','_blank','titlebar="no",left=300,top=100, height=700,width=600,status=no,toolbar=no,menubar=no,location=no');
///AJAX
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_xgll.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在提取记录,请稍等.";
    return;
    
   }
   //alert(xhr.responseText);
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null);
}

function xgll_delete(id){  //删除留言
 //alert(id);
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_xgll_delete.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在删除记录,请稍等!!!";    
    return;
   }
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null); 
}

 


function gyxx(id){  //供应信息
  //alert(id);
 document.body.style.overflow = 'hidden';
 document.body.style.height = document.documentElement.clientHeight + 'px';
 obj.style.display = 'block';
 obj.style.height = document.documentElement.clientHeight + 'px';
// window.open('user_index_fbxx.jsp','_blank','titlebar="no",left=300,top=100, height=700,width=600,status=no,toolbar=no,menubar=no,location=no');
///AJAX
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_gyxx.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在提取记录,请稍等.";
    return;
    
   }
   //alert(xhr.responseText);
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null);
}

function xqxx(id){  //需求信息
  //alert(id);
 document.body.style.overflow = 'hidden';
 document.body.style.height = document.documentElement.clientHeight + 'px';
 obj.style.display = 'block';
 obj.style.height = document.documentElement.clientHeight + 'px';
// window.open('user_index_fbxx.jsp','_blank','titlebar="no",left=300,top=100, height=700,width=600,status=no,toolbar=no,menubar=no,location=no');
///AJAX
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_xqxx.jsp?id="+id);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在提取记录,请稍等.";
    return;
    
   }
   //alert(xhr.responseText);
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null);
}

 

 


/特效1
var obj = new Object;

function oload(){
 obj = document.getElementById('topFill');
 obj.style.display = '';
}

function cl(a){
 document.body.style.overflow = 'hidden';
 document.body.style.height = document.documentElement.clientHeight + 'px';
 obj.style.display = 'block';
 obj.style.height = document.documentElement.clientHeight + 'px';
// window.open('user_index_fbxx.jsp','_blank','titlebar="no",left=300,top=100, height=700,width=600,status=no,toolbar=no,menubar=no,location=no');
///AJAX
 var xhr;
  try{
   xhr=new ActiveXObject("Msxm12.XMLHTTP");
  }
  catch(e){
   try{
    xhr=new ActiveXObject("Microsoft.XMLHTTP");
   }
   catch(E){
    xhr=false;
   }
  }
  if(!xhr && typeof XMLHttpRequest !='undefined'){
   xhr=new XMLHttpRequest();
  }
  //jsu_id=document.getElementById("u_id").value;
  xhr.open("GET","user_index_fbxx.jsp?id="+a);

  xhr.onreadystatechange=function(){
   if(xhr.readyState !=4) {
    document.getElementById("alertContent").innerHTML="正在提取记录,请稍等.";
    return;
    
   }
   //alert(xhr.responseText);
   document.getElementById("alertContent").innerHTML=xhr.responseText;
  }
  xhr.send(null);
}

/ AJAX结束

function bcl(){
 document.body.style.overflow = '';
 obj.style.display = 'none';
 document.forma.submit();
}
function oresize(){
 if(obj.style.display != 'block'){
 
 }else{  //cl(); 
 }
}
function isno(str){
 if (str == 'yes'){
   window.close();
 }else {
   bcl();
 }
}
特效2,FIREFOX下效果不好,不采用。
    function isObject(obj){
        if (obj != null && typeof(obj) != "undefined")
            return true;
        else
            return false;
    }
   
    function focusFirstElement(formName){
        var form = document.forms[formName];
        if (!isObject(form) || form.tagName != "FORM")
            return;
           
        var elements = form.elements;
        for (var i = 0; i < elements.length; i++) {
            if (elements[i].type == 'text' && !elements[i].disabled) {
                elements[i].focus();
                break;
            }
        }
    }
   
    function fillNumbericOptions(start, end, val){
        var str = "";
        for (var i=start; i<=end; i++){
            str += "<option value='" + i + "'" ;
            if (i == val)
                str += " selected";
            str += " >" + i + "</option>";
        }

        document.write (str);
    }
   
    function fillOptions(data, val){
        var str = "";
        for (var i=0; i<data.length; i++){
           
            str += "<option value='" + data[i][0] + "'" ;
            if (data[i][0] == val)
                str += " selected";
            str += " >" + data[i][1] + "</option>";
           
        }
       
        document.write (str);
    }
   
    function fillQuestionOptions(val){
       fillOptions(hintQuestionList, val);
    }
   
    function fillIDTypeOptions(val){
       fillOptions(IDCardTypeList, val);
    }
   
    function fillSecureOptions(val){
       
       fillOptions(updateSecureList, val);
    }
   
    function getHintQuestion(val){
        if (val == "")
            return val;
           
        for (var i=0; i<hintQuestionList.length; i++){
            if (hintQuestionList[i][0] != "" && hintQuestionList[i][0] == val)
                return hintQuestionList[i][1];
        }
    }
   
    function getUpdateSecure(val){
        if (val == "")
            return val;
           
        for (var i=0; i<updateSecureList.length; i++){
            if (updateSecureList[i][0] != "" && updateSecureList[i][0] == val)
                return updateSecureList[i][1];
        }
    }
   
    function getIDCardType(val){
        if (val == "")
            return val;
           
        for (var i=0; i<IDCardTypeList.length; i++){
            if (IDCardTypeList[i][0] != "" && IDCardTypeList[i][0] == val)
                return IDCardTypeList[i][1];
        }
    }
   
    function getCountry(val){
        if (val == "")
            return val;
       
        for (var i=0; i<countryList.length; i++){
            if (countryList[i][0] != "" && countryList[i][0] == val)
                return countryList[i][1];
        }
    }
   
    function hideSelectForm(){
        var opts = document.getElementsByTagName("SELECT");
        if (opts == null || typeof(opts) == "undefined")
            return ;
           
        for (var i=0; i<opts.length; i++){
            opts[i].style.visibility = "hidden";
        }
    }
   
    function showSelectForm(){
        var opts = document.getElementsByTagName("SELECT");
        if (opts == null || typeof(opts) == "undefined")
            return ;
           
        for (var i=0; i<opts.length; i++){
           
            opts[i].style.visibility = "visible";
        }
    }
   
    function createBgDiv(id){
        if (!isObject(id))
            id = "backgroundDiv";
          
        offHeight = window.screen.height;
        var div = document.createElement("DIV");
        div.id = id;
        div.style.left = 0;
        div.style.top = 0;
        div.style.width=document.body.scrollWidth;
        div.style.height = document.body.scrollHeight;
        div.style.position = "absolute";
        div.style.display = "";
        div.style.zIndex = "999";
        //div.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
        div.style.backgroundColor="#2A4A6B";
        document.body.appendChild(div);
        hideSelectForm();
       
        fadeBg(10, id);
       
        return div;
    }
   
    function fadeBg(index, str){
        var obj = document.getElementById(str);
        obj.style.filter = "alpha(Opacity=" + index + ")";
       
        if (index < 50)
            window.setTimeout("fadeBg(" + (index+5) + ", '" + str + "')", 10);
       
    }
 function showConfirmMsg1(a){
  if (!isObject(document.getElementById("logoutDiv")))
    createBgDiv("logoutDiv");
    
   var infoDiv = document.getElementById("logoutInfoDiv");
   
   infoDiv.innerHTML = generateConfirmLogoutMsg();
   
   with(infoDiv.style){
    zIndex = 1000;
    position = "absolute";
    width = "300px";
    top = (document.body.offsetHeight-150)/2 + document.body.scrollTop;
    left = (document.body.offsetWidth-400)/2;
    border = "1px #4372A5 solid";
    padding = "10px";
    backgroundColor = "#ffffff";
    filter = "Alpha(Opacity=90)";
    display = "block";
   }
   
 }
 
 function cancelLogout(){
  var aa = document.getElementById("logoutDiv");
  var infoDiv = document.getElementById("logoutInfoDiv");
   infoDiv.style.display = "none";
  
  if (isObject(aa))
   document.body.removeChild(aa);    
  
  showSelectForm();
 }
   
 function generateConfirmLogoutMsg(){
  var msg = "";
  
  msg += '<table width="400"  border="0" cellspacing="0" cellpadding="0" >';
  msg += '<tr>';
  msg += '<td bgcolor="DEE8F3" class="Bold_font" height="30">&nbsp;确认退出</td>';
  msg += '</tr>';
  msg += '<tr>';
  msg += '<td align="left" >&nbsp;</td>';
  msg += '</tr>';
  msg += '</table>';
  msg += '<table width="400"  border="0" cellspacing="0" cellpadding="0" >';
  msg += '<tr>';
  msg += '<td class="register" height="30" align="left">您确定要退出35通行证吗?</td>';
  msg += '</tr>';
  msg += '<tr>';
  msg += '<td align="center" >';
  msg += '<input id="submitB" type="submit" value=" 退 出 " name="input" class="buttomw" οnclick="window.location=/'http://login.passport.35.com/logout.srf /'"> &nbsp;&nbsp;&nbsp;';
  msg += '<input type="button" value=" 取 消 " name="input" class="buttomw" οnclick="cancelLogout()">';
  msg += '</td>';
  msg += '</tr>';
  msg += '</table>';
  
  return msg;
  }
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值