<script type="text/javascript">
if(navigator.appName.charAt(0)=='M' && navigator.appVersion.indexOf('MSIE 9')==-1){
location.href = 'index.html';
} else {
location.href = 'index1.html';
}
</script>
이렇게 하면 자동으로 해당 파일로 이동이 되는것입니다
location.href = 'index.html';
이걸 특정 파일로 인쿨르드 하고 싶은데요 찾아봐도 잘 모르겠어서요
예를 들어
<? include_once($skin_path.'/index.php'); ?>
이렇게 인클루드된게 있는데 브라우저별로 틀리게 할 필요가 있어서요
이방법말고 다른방법이 있으면 알려주셔요
if ie 이건 익스플로어에서만 되과 다른 브라우저에선 안되니 무용지물이내요
if(navigator.appName.charAt(0)=='M' && navigator.appVersion.indexOf('MSIE 9')==-1){
location.href = 'index.html';
} else {
location.href = 'index1.html';
}
</script>
이렇게 하면 자동으로 해당 파일로 이동이 되는것입니다
location.href = 'index.html';
이걸 특정 파일로 인쿨르드 하고 싶은데요 찾아봐도 잘 모르겠어서요
예를 들어
<? include_once($skin_path.'/index.php'); ?>
이렇게 인클루드된게 있는데 브라우저별로 틀리게 할 필요가 있어서요
이방법말고 다른방법이 있으면 알려주셔요
if ie 이건 익스플로어에서만 되과 다른 브라우저에선 안되니 무용지물이내요
댓글을 작성하시려면 로그인이 필요합니다.
댓글 6개
참고 하세요.
제가 찾는게 아니에요ㅜㅜ
쉽게 설명하면 자바스크립스에서 인쿨르드 되는 방법을 찾고있는거에요
비교해서 a 또는 b파일로 이동이 아니고 a 또는 b파일이 현페이지 내에 출력하는것을 찾고 있습니다
ajaxf 로 해서 php를 읽어오던가 iframe으로 페이지를 바꾸어주던가 해야 합니다
<!--
if(navigator.appName.charAt(0)=='M' && navigator.appVersion.indexOf('MSIE 9')==-1){
document.write("<script src='<?php echo $path?>/js/script1.js' type='text/javascript'></script>");
} else {
document.write("<script src='<?php echo $path?>/js/script2.js' type='text/javascript'></script>");
}
-->
</script>