Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
画像をリセット ボタンとして使用したいのですが、HTML と CSS でどのコードを使用すればよいですか?
これでうまくいくと思います。
<button type="reset"> <img src="#" alt="" /> </button>
良い質問。私の知る限り、できません。画像は送信ボタンとしてのみ機能します。通常の画像に対して Javascript を使用するonclick="this.form.reset()"か、背景画像を使用して通常のリセット ボタンのスタイルを設定する必要があります (問題なく実行できるはずです)。
onclick="this.form.reset()"