Просмотр исходного кода

Merge branch 'sowon' into develop

sowon4187 5 лет назад
Родитель
Сommit
44e3189914
1 измененных файлов с 19 добавлено и 11 удалено
  1. 19 11
      src/main/webapp/WEB-INF/views/marketing/PollListForm.html

+ 19 - 11
src/main/webapp/WEB-INF/views/marketing/PollListForm.html

@@ -234,7 +234,7 @@
 		<input type="hidden" name="pollQsq" value=""/>
 	</td>
 	<td>
-		<input type="text" name="pollQtitle" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQtitle" class="type-text" style="width: 100%;"onkeyup="chkChar(this)"/>
 	</td>
 	<td>
 		<select name="pollQtype">
@@ -242,34 +242,34 @@
 		</select>
 	</td>
 	<td>
-		<input type="text" name="pollQval1" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval1" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval2" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval2" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval3" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval3" class="type-text" onkeyup="chkChar(this)"style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval4" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval4" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval5" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval5" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval6" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval6" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval7" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval7" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval8" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval8" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval9" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval9" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	<td>
-		<input type="text" name="pollQval10" class="type-text" style="width: 100%;"/>
+		<input type="text" name="pollQval10" class="type-text" onkeyup="chkChar(this)" style="width: 100%;"/>
 	</td>
 	</tr>
 </table>
@@ -771,6 +771,14 @@
 		}
 	}
 
+	function chkChar(obj){
+	    var RegExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi;	//정규식 구문
+	    if (RegExp.test(obj.value)) {
+	      // 특수문자 모두 제거    
+	      obj.value = obj.value.replace(RegExp , '');
+	    }
+  	}
+	 
 	$('#stTimeHour').on('change', function() {
 		$('#stTime').val($(this).val() + ':' + $('#stTimeMin').val() + ':' + '00');
 	});