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. QzzmServer v2.0正式版发布

                                 V2.1升级程序已发布,具体见下文                                首先,感谢网友的热情的测评及反馈,现Qzzm ...

  2. 将 Servlet (HTTP POST/GET)请求发布到OSB

    转载地址:http://user.qzone.qq.com/32221895/blog/1406960844 ------------------------------------- 发帖要200字 ...

  3. c/c++性能优化--I/O优化(上)

    这节本想直接介绍I/O优化的,后来思考一下有必要对常用的I/O操作函数的特点介绍一下,这样要好些.下面就先介绍和I/O有关的库函数(以C99为准) 不同的操作系统有不同的文件管理方式,现行的主要有FA ...

  4. Linux:用at和crontab调度作业

    一.有2种作业调度方式 1.突发性的,就是只运行作业一次而不是定期运行,使用at命令. 例如在进程A运行一段时间后关闭该进程. 2.定期运行,就是每隔一定的周期运行一次,使用crontab命令. 如每 ...

  5. dm3730和dm6437,dm6446,AM335x启动过程的不同

    dm3730的启动流程为RBL+X-loader+uboot+uImage分别在片内ROM(fireware),片内SRAM,片外的DDR,片外的DDR. 之所以建立这样一个复杂的启动过程,我个人的理 ...

  6. toFixed()要注意的

    toFixed()是Number类型的一种方法,该方法是保留四舍五入取指定位数的小数点,但最终返回值类型是字符串.所以,刚开始用该方法的人要注意不要在计算时使用到该方法.

  7. Myeclipse 2016 CI 6 破解

    Myeclipse 2016 CI 6 破解 2016-10-11 分类:Javaweb后台 / JSP / 首页 阅读(1633) 评论(16)  之前写了myeclipse 2015 stable ...

  8. MySQL索引方法

    MySQL目前主要有以下几种索引方法:B-Tree,Hash,R-Tree. 一.B-Tree B-Tree是最常见的索引类型,所有值(被索引的列)都是排过序的,每个叶节点到跟节点距离相等.所以B-T ...

  9. js判断移动端与pc端

    这里介绍下使用device.js插件来判断移动端设备 地址:https://github.com/matthewhudson/device.js 示例: if(device.mobile()){ wi ...

  10. Docker集群实验环境布署--swarm【6 配置上层Nginx代理,让任意Docker client访问得到高可用的管理API】

    10.40.42.10上,也就是对应的VRRP中的10.40.42.1和2上,配置nginx tcp代理   # cat 4000_manager.venic.com_10.40.100.141-14 ...