admin管理员组

文章数量:1569593

预期实现的是在手机webview点击按键,在iframe中直接加载路由器网页中的指定页面,通过ajax跳过用户名和密码的验证,用户名和密码都是admin。通过下面的代码测试,在我的华为手机上可以正常运行,但是在朋友的三星手机上却会报错401;有大佬知道错误是怎么回事吗,或者有没有其他办法实现呢

代码如下:

var btn = document.getElementById("btn");

var ifr = document.getElementById("ifr");

btn.onclick = function() {

window.setTimeout(function() {

mui.ajax({

url: 'http://10.10.11.234',

contentType: "application/json",

dataType: "json",

username: 'admin',

password: 'admin',

type: "GET",

success: function(data) {}

});

}, 1000);

window.setTimeout(function() {

ifr.src = "http://10.10.11.234/wifi_set_cn.html";

}, 2000);

}

本文标签: 路由器跳过界面ajax