메인메뉴 바로가기

HOME으로 가기


Javascript

사용자함수 | 아이프레임 페이지의 swf 플래시변수 제어하기

본문

<!DOCTYPE HTML>

<html lang="ko">

<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

<title>eBook Viewer</title>

<script src="//code.jquery.com/jquery-latest.js"></script>

<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

<SCRIPT LANGUAGE="JavaScript">

<!--

 

//ebook.html?page=default1.html&px-time=1491786102&px-hash=c35586dbed059aad480ff9130ace54e9&books_id=S-GK-ad-21&isbn=6125&uid=ybm10&repeat=0&mode=1&recentpage=0&isstop=y

 

var CDN = {

set : function(){

var URL = location.href.split("?");

var page = CDN.getParameter("page");

var time = CDN.getParameter("px-time");

var hash = CDN.getParameter("px-hash");

var Parm = URL[1].split('&books_id=');

var iframe = document.getElementById('book_frame');

iframe.src = page+"?books_id="+Parm[1];

iframe.onload = function(){

var dBook = iframe.contentWindow.document.getElementById("dBook");

alert(dBook.src);

dBook.src += "&px-time="+time+"&px-hash="+hash;

}

},

getParameter : function(p) {

if (p) r=location.search.match(new RegExp("[&?]"+p+"=(.*?)(&|$)"));

return r&&r[1]?r[1]:null;

}

}

window.onload = CDN.set;

-->

</SCRIPT>

</HEAD>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" height="100%">

<iframe id="book_frame" width="100%" frameborder="0" src="" style="height: 950px; width: 100%;"></iframe>

</BODY>

</HTML>​ 

  • 페이스북으로 보내기
  • 트위터로 보내기
  • 구글플러스로 보내기