Показать сообщение отдельно
  #4 (permalink)  
Старый 14.08.2020, 12:29
Аватар для voraa
Профессор
Отправить личное сообщение для voraa Посмотреть профиль Найти все сообщения от voraa
 
Регистрация: 03.02.2020
Сообщений: 2,745

Как нибудь так попробуйте

<!DOCTYPE html>
<htmll lang="ru">
<head>
  <title>Untitled</title>
  <meta charset="utf-8">
</head>
<body>
<div align="left">We accept payment in the form of <strong>PayPal</strong> (preferred method). Payment must be made via eBay. Items will not ship until payment is received. We are required to collect 8.875% sales tax to all orders shipped to NY state residents. This will be added to your order upon checkout. International orders can only be made via PayPal. Please contact us via Ebay for more information. <br></div>
<button id=bch>Заменить</button>
</body>
<script>
let rex =/We\saccept\spayment\sin\sthe\sform\sof\s<strong>PayPal<\/strong>(.+)Please\scontact\sus\svia\sEbay\sfor\smore\sinformation\.\s<br>/;

let ss =`We accept payment in the form of Credit or Debit card.<br>
Items will not ship until payment is received.<br>
We are required to collect sales tax to all orders.<br>
This will be added to your order upon checkout.<br>
Please contact us for more information.`

document.getElementById('bch').onclick = () => document.body.innerHTML = document.body.innerHTML.replace(rex, ss);
</script>
</html>

Последний раз редактировалось voraa, 14.08.2020 в 12:33.
Ответить с цитированием