在chrome console中添加jQuery
由于现有seajs等封装,jQuery等已不在全局暴露,即使网站中已使用jQuery,在console也使用不了。
在chrome中可以用以下代码加入jQuery:
fetch('//code.jquery.com/jquery-latest.min.js').then(r => r.text()).then(r => eval(r))
POST JSON 数据:
jQuery.ajax({
"url":"/someurl",
"method":"POST",
"headers": { "Content-Type": "application/json"},
"dataType":"JSON",
"processData":false,
"data":JSON.stringify({}),
"success": function(data){
console.log(data);
copy(data);
}
})
POST application/x-www-form-urlencoded 数据
jQuery.ajax({
"url":"/url",
"method":"POST",
"dataType":"JSON",
"data": {"key": "value"},
"success": function(data){
console.log(data);
}
})
或
jQuery.ajax({
"url":"/url",
"method":"POST",
"dataType":"JSON",
"processData":false,
"data": jQuery.param({"key": JSON.stringify(object)}),
"success": function(data){
console.log(data);
}
})
来自: stackoverflow
在chrome console中添加jQuery的更多相关文章
- 如何在网页中添加 jQuery。
转自:http://www.runoob.com/jquery/jquery-install.html 网页中添加 jQuery 可以通过多种方法在网页中添加 jQuery. 您可以使用以下方法: 从 ...
- 浏览器console中加入jquery,测试选择元素
一.chrome浏览器F12打开调试界面,在console中输入(firefox同样可以): var jquery = document.createElement('script'); jquery ...
- 在django模板中添加jquery
路径 /project_name /app_name /templates /index.html /project_name setting.py /static /js jquery.js 导入方 ...
- 在Chrome Console中加载jQuery
var jq = document.createElement('script'); jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/j ...
- vs2013在用户控件中添加jquery智能提示
一.在script文件夹下面添加_references.js文件夹 二.把jquery文件拖到该文件中 保存,重新打开相应的文件,即出现智能提示
- [No000014D]chrome console 调试 引入 jquery等外部库
var importJs=document.createElement('script') //在页面新建一个script标签 importJs.setAttribute("type&quo ...
- 再eclipse的javaweb项目中添加JQuery文件时jquery-2.1.4.min.js报错
解决方法: eclipse导入jquery包后报错,下面有个不错的解决方法,需要的朋友可以参考下 eclipse导入jquery包后报错,处理步骤如下: 1.打开项目.project文件,去掉如下内容 ...
- 浏览器console中加入jquery方便调试
var jquery = document.createElement('script'); jquery.src = "http://apps.bdimg.com/libs/jquery/ ...
- chrome console控制台引入jquery库
var jqueryJs=document.createElement('script');jqueryJs.setAttribute("type","text/Java ...
随机推荐
- EDF转TXT,EDF转mat,rec转TXT eeg
https://files.cnblogs.com/files/myohao/edfsample.zip
- 使用min-device-pixel-ratio媒体功能实现真正的1像素border
关于设备像素比的知识,想必做过移动端开发的都有接触,这里就不介绍啦,万一有不懂的可以看张鑫旭大神的设备像素比devicePixelRatio简单介绍 由于设备像素比存在的原因,我们在处理设计图的一些边 ...
- biaffineparser
代码: 一.pytorch,可以直接跑 https://github.com/chantera/biaffineparser python parser.py train --out model -- ...
- excle中表引用
- Spring ConditionalOnProperty
Spring Annotation @ConditionalOnProperty spring doc解释 @Conditional: Indicates that a component is on ...
- H5 实现图片上传预览
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- CodeForce 517 Div 2. C Cram Time
http://codeforces.com/contest/1072/problem/C C. Cram Time time limit per test 1 second memory limit ...
- zabbix自动发现及其自动注册
在大企业环境中,不可能在zabbix页面上逐个添加被监控的主机.还好zabbix自带自动发现和自动注册功能 被监控端安装zabbix客户端之后,将配置文件配置指向服务器端ip即可.红色箭头改为zabb ...
- Flagr 配置说明
说明文档来自官方文档 https://checkr.github.io/flagr/#/flagr_env 完整配置 包含了组件的配置参数以及说明,对于学习如何使用Flagr 还是很重要的,包含了数据 ...
- 出现 OSError: symbolic link privilege not held的解决方案
jupyter notebook 出现 OSError: symbolic link privilege not held问题时 以管理员方式重新打开prompt.