zoukankan      html  css  js  c++  java
  • 客户端代码,服务器端代码

    区分本地js代码和服务端解析后传给本地的代码,,'<s:if test="ss=='+ii+'">'   struts 是服务端解析后传入浏览器 ,ii  是本地js ,不能混合使用, 可运用    局部刷新技术实现局部刷新 ,  也可以全部解析后在使用js  进行帅选 

    注意:   js  和jsp 代码解析的顺序 ,  

      var indestryHtmlEr="<s:iterator value='indestryThree'><s:if test='code.substring(0,2)=="+ii+"'><tr><td width='140px' vdd='${code}' onclick='indestryfuzhi(\"${code}\")'   是无法执行的  ,,返回值为空  

    function getsanji(ii){
    //alert("fd");
    $("input:[name=t.industry]").unbind("blur");
    var indestryHtmlEr="<s:iterator value='indestryThree'><tr><td width='140px' vdd='${code}' onclick='indestryfuzhi(\"${code}\")' onmouseover='this.style.backgroundColor=\"blue\";indstryunbind();' onmouseout='this.style.backgroundColor=\"#FFF\";instrybund();'>${desc}</td></tr></s:iterator>";
    if (navigator.userAgent.indexOf("Firefox")>0) { // Mozilla, Safari, ...
    indestryHtmlEr="<div style='background-color:#FFF;position: absolute;top: 439px;left: 405px;140px;height:300px;border:1px solid #ccc;overflow-y: scroll;'><table>"+indestryHtmlEr+"</table></div>";
    } else if (navigator.userAgent.indexOf("MSIE")>0) { // IE

    indestryHtmlEr="<div style='background-color:#FFF;position: absolute;top: 419px;left: 405px;140px;height:300px;border:1px solid #ccc;overflow-y: scroll;'><table>"+indestryHtmlEr+"</table></div>";
    }else {
    indestryHtmlEr="<div style='background-color:#FFF;position: absolute;top: 439px;left: 405px;140px;height:300px;border:1px solid #ccc;overflow-y: scroll;'><table>"+indestryHtmlEr+"</table></div>";
    }

    $("#indestryjiegouSan").html(indestryHtmlEr);
    $("#indestryjiegouSan tr td").each(function(){
    if($(this).attr("vdd").substr(0,4)!=ii.substr(0,4)){
    $(this).parent().remove();
    }
    });

  • 相关阅读:
    03_线性表
    02_算法与数据结构
    01_python中内置类型的时间复杂度
    00_常见的时间复杂度
    03_docker导出和导入镜像
    09_创建mysql数据库的用户
    14_linux添加主机列表
    13_linux修改主机名
    12_centos7安装好后的网络设置
    00_使用pdb调试python代码
  • 原文地址:https://www.cnblogs.com/zhangchenglzhao/p/3009999.html
Copyright © 2011-2022 走看看