- 정보공유
[JQUERY] magnificPopup iframe 으로 form submit 하기
magnificPopup iframe 으로 form submit 하기
<script type="text/javascript">
<!--
$(function(){
$('.iframe-win').magnificPopup({
type:'iframe',
callbacks: {
beforeOpen: function() {
;
},
elementParse: function(item) {
// Function will fire for each target element
// "item.el" is a target DOM element (if present)
// "item.src" is a source that you may modify
item.src = '{아이프레임경로}?'+$('#wzfrm').serialize();
},
change: function() {
// Direct reference to your popup element
},
}
});
});
//-->
</script>
<form method="post" name="wzfrm" id="wzfrm">
<input type="hidden" name="parm1" value="1">
<input type="hidden" name="parm2" value="2">
<input type="hidden" name="parm3" value="3">
</form>
<a href="#none" class="iframe-win">아이프레임</a>