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. cocos2dx在Eclipse下编译报错:Cannot find module with tag 'CocosDenshion/android' in import path

    在Eclipse下编译cocos2dx项目,报错如下: Android NDK: jni/Android.mk: Cannot find module with tag 'CocosDenshion/ ...

  2. JS获取table表格任意单元格值

    jsp页面表格布局 <body onload="show()"> <center> <input type="text" valu ...

  3. 创建 Mac OS X 10.9 USB 安装盘

    通过 App Store 下载最新的 OS X 10.9 在“应用程序”目录找到下载的 OS X 10.9 安装文件,选中并鼠标右键,菜单中选择“显示包内容” 弹出的 Finder 中进入 Conte ...

  4. JS、JQuery和ExtJs动态创建DOM对象

    做了个简单使用JavaScript.JQuery.ExtJs进行DOM对象创建的测试,主要是使用JavaScript.JQuery.ExtJs动态创建Table对象.动态Table数据填充.多选控制. ...

  5. Hadoop Streaming Command Details and Q&A

    Hadoop Streaming Hadoopstreaming is a utility that comes with the Hadoop distribution. The utilityal ...

  6. 计算机就是用命换的行业,多干一年程序猿,寿命将减少2年,干20年的编程苦力,基本60岁之前你就要OVER了

    if  c++==python:(869710179) 2013-7-6 10:21:31 计算机本来就是用命换的行业 爱笑的眼睛(373213735) 2013-7-6 10:21:55 if  c ...

  7. LaTeX入门教程(二)

    LaTeX(LATEX,音译"拉泰赫")是一种基于ΤΕΧ的排版系统,由美国计算机学家莱斯利·兰伯特(Leslie Lamport)在20世纪80年代初期开发,利用这种格式,即使使用 ...

  8. Linux实战教学笔记09:通配符

    第九节 通配符 标签(空格分隔): Linux实战教学笔记 ---更多详细资料请点我查看 第1章 回顾特殊符号 | #管道符,或者(正则) > #输出重定向 >> #输出追加重定向 ...

  9. 分离JavaScript

    分离JavaScript类似于使用style属性,在HTML文档里使用诸如onclick之类的属性也是一种既没有效率又容易引发问题的做法.如果我们用一个"挂钩",就像CSS机制中的 ...

  10. 查增删改MySQL数据库固定模式

    省略相关包的导入... public class Base { public static Connection connection = null; public static PreparedSt ...