1、快速迭代元素

$$('tr.dispute-num td strong a').map(function (el) { return el.innerHTML; })

2、复选框选中/取消选中

checks.map(function(check){$(check).prop( "checked", false );})

3、打开多个链接

$x("//table[@id='orderListTable']/tbody/tr/td[1]/table[@class='tableIn']/tbody/tr/td[2]/div/p[1]/a").map(function(link){link.click();})

4、将亚马逊后台业务报告的ASIN,属于自己上传的标记下来

['B01L1CDLR4', 'B01LX8BASZ', 'B01LZ6JWZB', 'B01M0EVDQR', 'B01LZFP6FN', 'B01JZP8BB0', 'B01K1B1BUK'].map(function(asin) {
$($x("//tr[descendant::a[text()='" + asin + "']]")).attr('style', 'background-color:yellow');
})

5、获取当前时间

function strpad00(s) { s = s + ''; if (s.length === 1) s = '0'+s; return s; } var currentdate = new Date(); var datetime = currentdate.getDate() + "/" + strpad00((currentdate.getMonth()+1)) + "/" + currentdate.getFullYear() + " @ " + currentdate.getHours() + ":" + strpad00(currentdate.getMinutes()) + ":" + strpad00(currentdate.getSeconds()); console.log(datetime);

6. 12321信息自动填写

$("input[id='phone']").val('13828863221');

$("input[id='phone']").blur();

$('input:radio[name=bad_type]').filter('[value=1]').prop('checked', true);

function strpad00(s)
{
s = s + '';
if (s.length === 1) s = '0'+s;
return s;
}

var currentdate = new Date();

var date = currentdate.getFullYear()
+ "-" + strpad00((currentdate.getMonth()+1))
+ "-" + currentdate.getDate();

var time = currentdate.getHours() + ":"
+ strpad00(currentdate.getMinutes());

console.log(date);
console.log(time);

$("input[id='d241']").val(date);

$("input[id='d242']").val(time);

$("input[id='d241']").blur();

$("textarea[id='sms_content']").val('金融贷款诈骗,地下钱庄高利贷,电信诈骗');

$("textarea[id='sms_content']").blur();

7、订单快速打开

['B01K1B1BUK', 'B01JZP8BB0', 'B01K1VP372', 'B01LXHSQXQ', 'B01KZXYT5S', 'B01LZFP6FN', 'B01M0EVDQR', 'B01LYKMZE6', 'B01LZ6JWZB', 'B01LX8BASZ', 'B01L1CDLR4', 'B01MEG9XYF', 'B01M5CUELP'].map(
function(asin) {
xpat = "//td[contains(@class, 'order-cell') and descendant::span[text()='" + asin + "']]/a";
$x(xpat).map(function(link) {
window.open(link)
});
})

8、竞价+0.05

$('table#keywordsTable tbody tr').each(function(index, row) {
var amazon_price = $(row).find('td:nth-child(6)').text();
amazon_price = parseFloat(amazon_price.replace(',', '.').replace('€', '').replace('£', '').replace('—', '0'));

var price_input = $(row).find('td:nth-child(7) div div input');
var your_price = price_input.val();
your_price = parseFloat(your_price.replace(',', '.').replace('€', '').replace('£', ''));

var bigger_price = amazon_price;
if (bigger_price < your_price) {
bigger_price = your_price;
}

var set_price = (bigger_price + 0.05).toFixed(2);

console.log('bigger price: ' + bigger_price);
console.log('set price: ' + set_price);

price_input.click();
$('div[class="a-popover cm-editor-popover"]').find('form').find('input[type=text]').val(set_price);
$('div[class="a-popover cm-editor-popover"]').find('form').find('input[type=submit]').click();
});

chrome console 命令简记的更多相关文章

  1. Chrome console命令整理

    console.dir (这个方法是我经常使用的 可不知道比for in方便了多少) 直接将该DOM结点以DOM树的结构进行输出,可以详细查对象的方法发展等等 在页面右击选择 审查元素 ,然后在弹出来 ...

  2. 【F12】Console命令,让js调试更简单

    Console命令,让js调试更简单 一.显示信息的命令 console.log("normal"); // 用于输出普通信息 console.info("informa ...

  3. [转]九个Console命令,让js调试更简单

    转自:九个Console命令,让js调试更简单 一.显示信息的命令 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <!DOCTYPE html> <html ...

  4. js调试工具Console命令详解

    这篇文章主要介绍了js调试工具Console命令详解,需要的朋友可以参考下   一.显示信息的命令 复制代码 代码如下: < !DOCTYPE html> < html> &l ...

  5. 9 个让 JavaScript 调试更简单的 Console 命令

    一.显示信息的命令 <!DOCTYPE html> <html> <head> <title>常用console命令</title> < ...

  6. 九个Console命令,让 JS 调试更简单

    一.显示信息的命令 <!DOCTYPE html> <html> <head> <title>常用console命令</title> < ...

  7. chrome console 调试xpath

    chrome console F12->$x(“//title”) [<title>Online Tools for Software Developers (Free)</t ...

  8. 前端开发chrome console的使用 :评估表达式 – Break易站

    本文内容来自:chrome console的使用 :评估表达式 – Break易站 从 DevTools 控制台使用它的某个评估功能查看页面上任意项目的状态. DevTools 控制台让您可通过特定方 ...

  9. chrome console的使用 : 异常和错误的处理 – Break易站

    本文内容来自:chrome console的使用 : 异常和错误的处理 – Break易站 利用 Chrome DevTools 提供的工具,您可以修复引发异常的网页和在 JavaScript 中调试 ...

随机推荐

  1. 关于arcengine权限的设置

    对于AE开发时候,如果调用arctoolbox中的部分功能,权限是arcview或者arceditor是无法执行的,因为权限不够. arcgis9.3的有3个权限arcview. arceditor. ...

  2. jQuery实现鼠标移上弹出提示框,移出消失

    <TD>里有一行数据 "那片笑声让我想起......"  假设超出规定长度将用......代替, 而现在要通过鼠标移动到......上 显示全部内容,移出则消失.如下图 ...

  3. ASP.NET MVC学习笔记-----Filter2

    ASP.NET MVC学习笔记-----Filter(2) 接上篇ASP.NET MVC学习笔记-----Filter(1) Action Filter Action Filter可以基于任何目的使用 ...

  4. 用c#实现与飞环语音卡的交互

    现在很多企业都采用freeswitch搭建的软交换来实现通话,主要优势成本低吞吐量大,但是语音卡的通话质量还是瑞胜一筹. 去年有机会在朋友公司里帮忙开发与软交换交互的上层服务及接口,在开发过程中稍微研 ...

  5. 利用connect建立前端开发服务器

    利用connect建立前端开发服务器 对于前后端完全分离的系统,开发时候我们需要给前端配置服务器,当然我们可以选择Nginx之类的服务器进行配置,但我们也能使用NodeJS构建高自由度的前端开发服务器 ...

  6. Go语言Web框架gwk介绍 1

    Go语言Web框架gwk介绍 (一)   今天看到Golang排名到前30名了,看来关注的人越来越多了,接下来几天详细介绍Golang一个web开发框架GWK. 现在博客园支持markdown格式发布 ...

  7. java applet初探之计算器

    这里是用java写的一个计算器,用appllet的方式在浏览器中运行,如果电脑上装有java运行环境jre就能一试.将html代码保存为*.html(名称能够自定),applettest编译为clas ...

  8. iOS 指南针的制作 附带源码

    iOS  指南针的制作  附带源码 代码下载地址: http://vdisk.weibo.com/s/HK4yE   http://pan.baidu.com/share/link?shareid=7 ...

  9. Windows平台下的node.js安装

    Windows平台下的node.js安装 直接去nodejs的官网http://nodejs.org/上下载nodejs安装程序,双击安装就可以了 测试安装是否成功: 在命令行输入 node –v 应 ...

  10. 从Chrome源码看浏览器如何构建DOM树

    .aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto } p { font-size: 1 ...