728x90
1. $("#selectbox").append(""+map.list[i]+"'");
2. $("#selectbox").append("+map.list[i]+"')'>"+map.list[i]+"'");
3. $("#selectbox").append(""+map.list[i]+"'");
출처: https://mingggu.tistory.com/93
동적 엘리먼트 생성 시 함수 인자 따옴표 (따옴표 안에 따옴표 안에 따옴표)
따옴표 안에 따옴표를 넣는게 헷갈릴 때가 많다. 기존에 하던 방식대로 했는데도 안될 때도 있고... 아래 세가지 방법중 하나가 걸리길..! 1. $("#selectbox").append("
728x90
'script' 카테고리의 다른 글
JQuery 와 Prototype 충돌 (0) | 2016.05.26 |
---|---|
InvalidCharactErerror (0) | 2016.01.11 |
iframe javascript access parent cross domain (0) | 2014.07.14 |
swap memory used check in sh (0) | 2014.07.03 |
JAVACRIPT 와 PHP 간 암호화 복호화 연동 (0) | 2014.06.27 |
댓글