소스 검색

id only ajax

ming 3 년 전
부모
커밋
29d86ccaf0
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      api/static/script_util.js

+ 3 - 3
api/static/script_util.js

@@ -125,11 +125,11 @@ $(".next").click(function () {
   console.log(data)
   result = xhr.send(objstr);
 });
-
+const buttonSend = document.querySelector('#sendBTN');
 $("#sendBTN").click(function () {
-  button.setAttribute('disabled', '');
+  buttonSend.setAttribute('disabled', '');
   setTimeout(function () {
-    button.removeAttribute('disabled')
+    buttonSend.removeAttribute('disabled')
   }, 4000);
   avatar = $('.avatar').val();
   name_title = $('.title_new').val();