惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Threat Research - Cisco Blogs
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
T
Threatpost
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
Scott Helme
Scott Helme
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
W
WeLiveSecurity
L
LINUX DO - 最新话题
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
Cisco Talos Blog
Cisco Talos Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
F
Fortinet All Blogs
The Hacker News
The Hacker News
IT之家
IT之家
Forbes - Security
Forbes - Security
月光博客
月光博客
S
Security @ Cisco Blogs
SecWiki News
SecWiki News
博客园 - 聂微东
GbyAI
GbyAI
S
Security Affairs
H
Heimdal Security Blog
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
AWS News Blog
AWS News Blog
T
Tenable Blog
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI

jQuery

油猴脚本能拦截$(document).ready 吗? - V2EX jquery 有什么树形可编辑表格的插件吗? - V2EX Jquery Datatable 前端分页 Checkbox 跨页全选的问题 - V2EX 想提取 jQuery 中的一些函数单独使用,有什么好方法吗 - V2EX 有没有小的简单的 jquery 路由 - V2EX 关于 JQuery.load(html)加载 html,导致父 html 的$.fn 以及$.unbind 失效的问题 - V2EX 使用 jquery.validate 插件对动态新增的表单进行校验 - V2EX <script id="aaa" src="xxx.com/foo.js"></script> 用 $.getScript(...) 可以把 id="aaa" 一起设置进去吗? - V2EX 为什么我的 select 的 change 事件会失效? - V2EX 请教一个 jquery contextmenu 问题,不同事件源怎么合到一个菜单里 - V2EX jQuery.extend 在深复制时,为什么需要判断 isPlainOjbect?(不是问 isPlainOjbect 方法的原理) - V2EX jquery 通过 ajax 返回新的 url 给前端重定向算前后端分离吗? - V2EX 前端 websocket 实时接收到音频流数据,如何在 web 端实时播放 - V2EX scrollTop()引发的一个操作问题 - V2EX jQuery 选择特定尺寸图片问题 - V2EX 如何在提交表单后获取到动态添加的 inpu 的值 - V2EX pdfObject 怎么监听进度 - V2EX 能帮我找找这个页面的细节 和 尺寸是那个 ajax 和 url 加载的吗? - V2EX 问个 Jquery 的选择元素的问题 - V2EX jQuery UI dialog 有熟悉的么,我想问个问题 - V2EX 实现滚动条离顶端一定距离之后异步加载广告 - V2EX 求指点 Refused to set unsafe header "cookie" - V2EX 问个 JQ 的选择节点的问题 - V2EX jquery 如何实现点击 p( class=‘aa’,没有 id)而选中 p 里面的文字? - V2EX 可以用 jquery 模拟键盘按键吗? - V2EX 外行请教京东 618 寻金记是怎么实现的? - V2EX 请教 jquery 跟换图片地址后展示的问题 - V2EX function 返回 ajax 结果 - V2EX Jquery 在移动端如何让返回能够不刷新页面? - V2EX jq ajax 返回的数据怎么获取其中一部分? - V2EX jquery 循环绑定事件问题 - V2EX jquery 表单验证 each 为什么不能 key 变量 - V2EX jquery 引入在底部 $ready 就要用到$ 但页面还没加载 jquery 不用$ready 下面的 jq 代码就没办法运行 - V2EX 注册了个域名,专门用于自己插件库的演示和文档说明 - V2EX 捏了个小 app,求推荐好看的下载页面模板 - V2EX 关于跟随鼠标移动的两个 js 功能合并问题,求解! - V2EX 新手问个问题呗? - V2EX 最新最全的城市三级联动插件 - V2EX 分享一个基于 jQuery 开发的强大的 CMS - V2EX 浮动 [电梯] 或 [回到顶部] 小插件: iElevator.js - V2EX 自制 WEB 前端插件库,欢迎使用~ bootstrap modal event 多次绑定 - V2EX Jquery 如何实现 Ajax 自动更新 table,并且不影响 js 事件 - V2EX 愿意付费帮忙修改一个 jq 插件! - V2EX 请问下 draggable 怎么实现拖动前后的元素不一样 - V2EX 自己写的一套 jquery 组件库 jquery mobile 的动态加载感觉好难用啊 jquery data() 返回数据类型不统一 - V2EX V2 的大神们帮我看看, JQuery 跨域请求遇到点问题 - V2EX
初学者在做做登陆界面使用 jQuery ajax()方法时直接出现 error, XMLHttpRequest.status=0,XMLHttpRequest.readyState=0,textStatus=error - V2EX
MMMcrystal · 2019-08-25 · via jQuery

因为使用了登录页面的模板,把 button 的 type 改为 button,但还是有问题

是在一个 wifi 里进行访问的

以下为 body 的代码

<body class="bg-primary">

<div class="unix-login">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="login-content">
<div class="login-logo">
<a href="index.html"><span>Focus</span></a>
</div>
<div class="login-form">
<h4>Administratior Login</h4>
<form>
<div class="form-group">
<label>用户名</label>
<input id="name" type="text" class="form-control" placeholder="用户名">
</div>
<div class="form-group">
<label>密码</label>
<input id="pwd" type="password" class="form-control" placeholder="密码">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember Me
</label>
<label class="pull-right">
<a href="#">Forgotten Password?</a>
</label>

</div>
<button id="loginbtn" type="button" class="btn btn-primary btn-flat m-b-30 m-t-30">登录</button>
<div class="register-link m-t-15 text-center">
<p>Don't have account ? <a href="#"> Sign Up Here</a></p>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

<script src="assets/js/lib/jquery.min.js"></script>
<script>

$(function(){

$("#loginbtn").click(

function (){

var name=$("#name").val();//获取页面中登录名和密码

var pwd=$("#pwd").val();

if(name==""|| pwd==""){//判断两个均不为空(其他判断规则在其输入时已经判断)

alert("账号密码均不能为空!")

return false;

}else{//以上均符合要求,则调用登录 esb 接口

$.ajax({

url:'192.168.0.163:8080/e-learning/login',//相对应的 esb 接口地址

data:{"username":name,"password":pwd},//向服务器(接口)传递的参数

type:'POST',

dataType:'json',

success:function(data){//服务器(接口)返回来的数据

if(data.code==100){//如果返回来的信息说明提交的信息为正确的

window.location.href='index.html';//正确登录后页面跳转至

}

else{//如果返回来的信息说明提供的信息为错误的

alert(data.message);

$("#name").val("");

$("#pwd").val("");

return false;

}

},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert("失败");
console.log(XMLHttpRequest.status);
console.log(XMLHttpRequest.readyState);
console.log(textStatus);
}

})

}

}

);

})
</script>

</body>