채택완료
링크버튼을 누르면 1초동안 비활성화 하는 방법이 있나요
링크버튼을 누르면 1초동안 비활성화 하는 방법이 있나요
자꾸 신청버튼을 여러번 누르게 되는데
고민입니다 ㅜㅜ;
아래는 신청버튼입니다
<input onclick="javascript:send(document.FormMain);" type="image" src="http://licenseclubicon.cdn2.cafe24.com/butn.gif" border="0" name="sending" style="font-family: Tahoma, 굴림; font-size: 9pt; color: rgb(34, 34, 34); orphans: auto; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px; width: 435.5px;">
답변 3개
채택된 답변
+20 포인트
일단 제이쿼리를 사용하신다는 가정하에 작업하였습니다.
아래 코드 처럼 input button 에 id를 sending 으로 동일하게 주었습니다.
만약 input onclick 이벤트에 send 에 포함 시키고자 한다면 약간만 변형 하시면 될것 같습니다.
Copy
<input onclick="javascript:send(document.FormMain);" id="sending" type="image" src="http://licenseclubicon.cdn2.cafe24.com/butn.gif" border="0" name="sending" style="font-family: Tahoma, 굴림; font-size: 9pt; color: rgb(34, 34, 34); orphans: auto; white-space: normal; widows: 1; -webkit-text-stroke-width: 0px; width: 435.5px;"> <script>$(document).ready(function() { $("#sending").click(function() { var click_btn = $(this); click_btn.attr("disabled",true); //버튼 disabled = true setTimeout(function() { click_btn.attr("disabled",false); //버튼 disabled = false },1000); //1000 = 1초 });});</script>
답변을 작성하려면 로그인이 필요합니다.