자바스크립트로 새창 띄우기
페이지 정보
본문
<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);">
- 이전글text 박스에서 글자위치 지정... style 21.02.10
- 다음글클릭시 페이지 변환없이 값을 input박스에 넣기 21.02.10
댓글목록
등록된 댓글이 없습니다.