我有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";;
}
});
});