zoukankan      html  css  js  c++  java
  • MUI 之picker,dialog,a标签——刷新页面问题(保留picker选中的数据)

    a标签问题

    <div class="stepBtnBox1 stepBtnBox ">
      <a class="before-btn" href="order-step1.html">上一步</a>
      <a id='alertBtn' class="on next-btn" >下一步</a>
      //点击a标签使得页面不刷新的两种方法
      //(1直接去掉href;)
      //(2在href属性后面加上javascript:void(0);)
    </div>
    dialog提示框问题(alert警告框,confirm确认框,prompt输入对话框,toast自动消失框参考exp里面的dialog.html页面)
     document.getElementById("alertBtn").addEventListener('tap', function(){
      var href="order-step3.html";
    picker下拉框选取数据问题(切换页面显示input框)
      if($("#picker1").val()=="不动产权证号"){
        if($(".input-true").val()==""){
          //mui自带提示框语句
          //3个参数:提示内容,提示标题,返回函数;
          //如果运用在手机上,一个参数都不能少,如果缺少参数用浏览器操作不会出现任何bug,但是手机不会显示出弹出框
          mui.alert('请查看权证号图例', '请输入不动产权证号', function() {
            $("#numInput1").focus();
          });	
        }else{
          $(this).attr("href",href);	
        }
      }
      if($("#picker1").val()=="老权证号"){
        if($("#numInput2").val()==""){
          mui.alert('请查看权证号图例', '请输入土地证号', function() {
            $("#numInput2").focus();
          });	
        }else if($("#numInput3").val()==""){
    
          mui.alert('请查看权证号图例', '请输入房地产证号', function() {
            $("#numInput3").focus();
          });	
        }else{
          $(this).attr("href",href);	
        }
       }
      if($("#picker1").val()=="其它"){
        $(this).attr("href",href);	
      }
    }); 
    

      

     
    DO What You Want !
  • 相关阅读:
    [crontab]修改默认编辑器
    [mysql]忘记用户密码或者误删用户账号
    [vim]多行注释和多行删除
    [mysql]my.cnf在哪里
    [python]有中文字符程序异常的解决方案
    [Linux]虚拟机无法安装deepin15.9的解决方案
    Elasticsearch5.X IN Windows 10 系列文章(2)
    Elasticsearch5.X IN Windows 10 系列文章(1)
    HTTP Error 502.5
    centos7 yum install redis
  • 原文地址:https://www.cnblogs.com/liumengdie/p/7831450.html
Copyright © 2011-2022 走看看