Created
October 14, 2019 08:28
-
-
Save shao1555/1e2b827dbeae280717fa390c9e4d1bee to your computer and use it in GitHub Desktop.
京东の注文明細印刷画面から抜き取った情報でファイル名をつくる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tradeDate = document.querySelector(".t2").firstChild.nodeValue.match(/\d{4}-\d{2}-\d{2}/)[0]; | |
let amount = document.querySelector(".ftx-01 .count").firstChild.nodeValue.match(/\d+\.\d{2}/)[0]; | |
let productName = document.querySelector(".p-name").firstChild.nodeValue; | |
console.log(`${tradeDate} [JD.com] ${productName} CNY${amount}.pdf`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment