<button type="button" onclick="javascript:play();" onfocus="this.blur()" title="" data-ch="standard">버튼</button>
<script>
function play(){
var ch = $(this).attr('data-ch');
window.open('/index.php?ch='+ch, 'plyer', 'left=100,top=100,width=500,height=600,scrollbars=0,location=no,toolbar=no,menubar=no,resizable=no');
}
</script>
저 파라미터값 ch에 버튼의 data-ch값을 넣고 싶은데 방법은 잘못됐는지 안되네요.
부탁드립니다.
답변 2개 / 댓글 1개
채택된 답변
+20 포인트
Copy
var ch = $(this).data('ch');
window.open('/index.php?ch='+ch+'plyer','left=100,top=100,width=500,height=600,scrollbars=0,location=no,toolbar=no,menubar=no,resizable=no');
답변을 작성하려면 로그인이 필요합니다.
사실 .data('ch'); 안되서 attr로 한거입니다. ㅜㅜ