-2005. 9. 7. 22:18-
<html>
<head>
<script language="javascript">
function getCookie(name)
{
var from_idx = document.cookie.indexOf(name+'=');
if (from_idx != -1)
{
from_idx += name.length + 1
to_idx = document.cookie.indexOf(';', from_idx)
if (to_idx == -1) to_idx = document.cookie.length
return unescape(document.cookie.substring(from_idx, to_idx))
}
}
function aa()
{
var strMC = getCookie("MC"); //추출한 값
var strMC2 = getCookie("CS"); //추출한 값
var ff=document.f2n;
ff.cook.value=strMC;
ff.cook2.value=strMC2;
ff.action="http://test.php; // 보낼 위치
ff.submit();
}
// if(!empty(strMC)) alert(strMC);
</script>
</head>
<body onLoad="aa()">
<form name="f2n" action="" method="post">
<input type="hidden" name="cook" value="">
<input type="hidden" name="cook2" value="">
</form>
</body>
</html>
'자바스크립트' 카테고리의 다른 글
jquery 다운로드 (0) | 2023.12.26 |
---|---|
자바스크립트 아이디 저장(쿠키) (0) | 2018.12.08 |
자바스크리트 select 이용한 계산 방법 (2) | 2018.12.08 |
자바스크립트 간단한 날짜 및 응용 SELECT 사용 하여 구하기 (0) | 2018.12.08 |
자바스크립트 테이블 감추기/보이기 (0) | 2018.12.08 |