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.
重複の可能性: jQuery を使用してアンカーを有効または無効にする方法は?
私はこれを持っています:
<a onclick="javascript:btnSave_onclick();" class="button">Save</a>
基本的に、リンクはボタンのように機能します。
ただし、無効にする必要がある場合はいくつかの条件があります。これを行う方法?
代わりにボタンを使用していない理由はありますか? その場合、あなたはただ使うことができます
document.getElementById('button').disabled = true;
ボタンのIDも設定する必要があります