在选项传递中选择单击功能

时间:2017-12-19 00:57:34

标签: jquery

我有2个文本框和1个下拉。我想要的是获取所选的选择和重定向的值。如何在按钮点击事件中传递语言值?

下拉列表的值是en_US和ja_JP 我的错误是未定义的语言

     $(document).ready(function(){
       //get selected option 
        $('.bfh-selectbox').on('change.bfhselectbox', function () {
           var currentlanguage = $(this).val();
        });



        $("#btn-signin").click(function() {
        //alert("The paragraph was clicked.");
        var user = $('#username').val();
        var pass = $('#password').val();
        var currentlanguage = "";


       if(user == "admin" && pass == "admin" && currentlanguage == "ja_JP") 
       {
       window.location = "http://localhost/neoDIME/ja/dashboard-staff.html";
       }
       else {
        window.location = "http://localhost/neoDIME/dashboard-staff.html";;
      }

      });
     });

0 个答案:

没有答案