[Input Tag] Same Name Array,SPATIUM
 SPATIUM Desktop
주소복사
About Operating System Languages Tools Favorites Notice Visit TEST  
     ADK (2)
     android (3)
     ASP (5)
     ASP.Net (1)
     C# (5)
     HTML (9)
     JAVA (6)
     JavaScript (9)
     jQuery (5)
     Mobile Web (2)
     Oracle (8)
     PHP (7)
     Spring Framework (4)
     SQL (15)
     WPF (5)
   ID  
   Password  
  |  
  Location United States
  IP Address 54.81.196.35
2018. 08
1234
567891011
121314151617
18
19202122232425
262728293031
Category  Languages, jQuery
Writer 김태우 Date 2013-12-11 10:42:11 Visit 2240
[Input Tag] Same Name Array
 

[Input Tag]  Same Name Array

Input 태그 name 이 복수 엘리먼트 처리시

 

html

<input type="text" name="telnumber[]" />-
<input type="text" name="telnumber[]" />-
<input type="text" name="telnumber[]" />

 

Script

var telNumber = value.split('-');
 
$.each($('input[name=telnumber\\[\\]]'), function (i, telArray) {
    $(telArray).val(telNumber[i]);
});

 

Script에서 value 값은 '02-1234-5687' 같은 형식이다.

 
Tags  input tag array, split
  Relation Articles
[Languages-jQuery] [Input Tag] Same Name Array (2013-12-11 10:42:11)
  Your Opinion
Member ID
150 letters
Copyright (C) SPATIUM. All rights reserved.
[SPATIUM]WebMaster Mail