자바스크립트로 새창 띄우기
페이지 정보
작성자 최고관리자 작성일 21-02-10 17:23 조회 9,468 댓글 0본문
<script language="Javascript">
<!--
function popup(val)
{
var url = "새창뜰파일...html?g_uid=" + val;
zip_win = window.open(url, 'new_win','width=633, height=280, scrollbars=yes resizable=yes top=0,left=160');
}
//-->
</script>
//------링크시키는 본문----
<a href='#' onClick="popup('$g_uid&g_kind=$g_kind&theme=$theme')">link</a><br>
#############################################################################################
-- 1. 메인
<script language="JavaScript" type="text/JavaScript">
<!--
function openPopWin(theURL,winName,features) { // 새창띄우기...........
PopWin = window.open(theURL,winName,features);
PopWin.moveTo(15,15);
PopWin.focus();
}
function getCookie(name)
{
var nameOfCookie = name + "=";
var x = 0;
while (x <= document.cookie.length)
{
var y = (x+nameOfCookie.length);
if (document.cookie.substring(x, y) == nameOfCookie)
{
if ((endOfCookie=document.cookie.indexOf(";", y)) == -1)
{
endOfCookie = document.cookie.length;
}
return unescape(document.cookie.substring(y, endOfCookie));
}
x = document.cookie.indexOf(" ", x) + 1;
if (x == 0)
{
break;
}
}
return "";
}
if (getCookie("Tender") != "done"){
openPopWin("pop.html", "Tender", "location=no,scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,screenX=10,screenY=10,width=550,height=650");
}
-->
</SCRIPT>
-- 2. 팝업창
<script language="JavaScript" type="text/JavaScript">
<!--
function setCookie(name, value, expiredays)
{
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
window.close();
}
-->
</script>
<input type="checkbox" onclick="setCookie('Tender','done',1);">
<!--
function popup(val)
{
var url = "새창뜰파일...html?g_uid=" + val;
zip_win = window.open(url, 'new_win','width=633, height=280, scrollbars=yes resizable=yes top=0,left=160');
}
//-->
</script>
//------링크시키는 본문----
<a href='#' onClick="popup('$g_uid&g_kind=$g_kind&theme=$theme')">link</a><br>
#############################################################################################
-- 1. 메인
<script language="JavaScript" type="text/JavaScript">
<!--
function openPopWin(theURL,winName,features) { // 새창띄우기...........
PopWin = window.open(theURL,winName,features);
PopWin.moveTo(15,15);
PopWin.focus();
}
function getCookie(name)
{
var nameOfCookie = name + "=";
var x = 0;
while (x <= document.cookie.length)
{
var y = (x+nameOfCookie.length);
if (document.cookie.substring(x, y) == nameOfCookie)
{
if ((endOfCookie=document.cookie.indexOf(";", y)) == -1)
{
endOfCookie = document.cookie.length;
}
return unescape(document.cookie.substring(y, endOfCookie));
}
x = document.cookie.indexOf(" ", x) + 1;
if (x == 0)
{
break;
}
}
return "";
}
if (getCookie("Tender") != "done"){
openPopWin("pop.html", "Tender", "location=no,scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,screenX=10,screenY=10,width=550,height=650");
}
-->
</SCRIPT>
-- 2. 팝업창
<script language="JavaScript" type="text/JavaScript">
<!--
function setCookie(name, value, expiredays)
{
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
window.close();
}
-->
</script>
<input type="checkbox" onclick="setCookie('Tender','done',1);">
댓글목록 0
등록된 댓글이 없습니다.