0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

クレジットカード決済用JavaScript準備⑥

Posted at
card.js
  const renderDom = document.getElementById("charge-form");
  const tokenObj = `<input value=${token} name='token' type="hidden"> `;
  renderDom.insertAdjacentHTML("beforeend", tokenObj);
      }
  document.getElementById("order_number").removeAttribute("name")
  document.getElementById("order_cvc").removeAttribute("name")
  document.getElementById("order_exp_month").removeAttribute("name")
  document.getElementById("order_exp_year").removeAttribute("name")

type="hidden

HTMLのは、ユーザーには見えない隠しフィールドを設置するために使います。
あくまでもブラウザ上で表示されていないだけで、ソースコード上では閲覧可能なことに注意しましょう。

emoveAttributeで属性を削除

removeAttribute('削除する属性')という形式で使います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?