Переглянути джерело

문진 작성 기타 작성안되는거 수정

huiwon.seo 4 роки тому
батько
коміт
7fe9bf64b5
1 змінених файлів з 14 додано та 0 видалено
  1. 14 0
      src/main/webapp/WEB-INF/jsp/mobile/servey/servey.jsp

+ 14 - 0
src/main/webapp/WEB-INF/jsp/mobile/servey/servey.jsp

@@ -112,6 +112,20 @@ $( function(){
             form.submit();
         }
     });
+    
+    $( "#symptomEtc" ).on( "change", function(){
+        var $this = $( this ).siblings( "div.label-readonly-check" );
+        console.log($this);
+        var checkbox = $this.find( "input[type='checkbox']" );
+        var textbox  = $this.find( "input[type='text']" );
+        
+        console.log(  $( this ).is(":checked") );
+        if( !$( this ).is(":checked") ){
+            textbox.prop( "readonly", true ).val("");
+        } else {
+            textbox.prop( "readonly", false );
+        }
+    });
 });
 
 function basalCheck(){