티스토리 뷰
+ prototypeUtils.js
/* prototypeUtils.js from http://jehiah.com/ Licensed under Creative Commons. version 1.0 December 20 2005 version 2.0 2010-01-08 by darthJun Contains: + unpackToForm() */ function unpackToForm(data){ for (i in data){ var val = (data[i]==null)? '' : data[i].valueOf(); if($$("input[type=radio][name='"+i+"']").length > 1) { // when element is radio group $$("input[type=radio][name='"+i+"'][value='"+ val +"']")[0].writeAttribute("checked", "checked"); continue; } if($(i)) $(i).setValue(val); } }
+ 사용법
<% '// 입력할 데이터 JSON DATA 가공 by Classic ASP '// 아래 data 는 레코드 한줄을 해쉬에 받은것 For Each strKey In data strVal = data(strKey) If isset(strVal) Then strVal = str_replace("\", "\\", strVal) strVal = str_replace("'", "\'", strVal) strVal = str_replace(vbCrLf, "\n", strVal) strData = strData &"'"& strKey &"':'"& strVal &"'," End if Next strData = Left(strData, Len(strData)-1) %>
'웹프로그래밍 > js' 카테고리의 다른 글
[jQuery] DateTime Picker (0) | 2010.01.23 |
---|---|
[jQuery] validate showErrors 로 에러메세지 출력 (0) | 2010.01.14 |
[jQuery] 플러그인 만들기 (한글 번역본) (0) | 2010.01.08 |
[jQuery] 플러그인들 (0) | 2010.01.07 |
[Prototype] AutoComplete (0) | 2010.01.05 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- laravel
- Wordpress
- Docker
- centos
- 안드로이드
- IOS
- 한글
- ASP
- javascript
- nginx
- API
- IE
- iis
- Linux
- sencha touch
- nodejs
- iphone
- git
- JQuery
- Debug
- Android
- PHP
- Prototype
- Mac
- mssql
- JSON
- macos
- CSS
- 워드프레스
- classic asp
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함