본문 바로가기
js

제이쿼리 html 함수 인자 싱글쿼테이션 사용..

by 멋진 개구리 2021. 3. 12.
반응형
$('#m_button_'+idx).html('<button type="button" class="btn btn-xs btn-primary" name="m_button" onclick="m_email(\''+nameForMail+'\',\''+email+'\')">수정</button>');

$(selector).html( 'button type="button" onclick="function(\''+변수+'\',\''+변수2+'\')">something</button>');

함수안에서 문자열사용 하는 방법...

반응형

'js' 카테고리의 다른 글

클릭한 버튼의 id값 확인  (0) 2021.03.25
ajax 즐겨찾기 버튼 만들기  (0) 2021.03.23
ajax 리스트 불러와서 화면쏴주기  (0) 2021.03.10
ajax로 데이터 가져와서 js, jQuery 로 tbody만들기  (0) 2021.02.23
handlebar 예제  (0) 2021.02.04

댓글