자바스크립트 관련 PHP세션 질문입니다...(_ _);;
<scRIPT LANGUAGE="Javascript">
var side_content = function() {
var __sidecontent = document.getElementById('sidecontent');
var __sidebtn = document.getElementById('_sidebtn');
if(__sidecontent.style.display != "none") {
__sidecontent.style.display = "none";
__sidebtn.src="/img/btn_side_open.png";
} else {
__sidecontent.style.display = "block";
__sidebtn.src="/img/btn_side_close.png";
}
}
</scRIPT>
----------------------------------------------------------------------------------------
<style type="text/css">
#sidecontent { position:relative; display:block; width:250px; height:100%; background-color:#f4f4f4;}
#sidecontent .menu-content { margin:5px 0 0 0; border-top:1px solid #D9D9D9; border-bottom:1px solid #D9D9D9; background-color:#EFEFEF; padding:5px; }
#sidecontent .menu-content a { letter-spacing:-1px; color:#484848; padding:0 5px 0 5px; }
#sidecontent .menu-content a:hover { text-decoration:underline; }
#sidecontent .menu-content .menuline { margin:5px 0 5px 0; }
.btn_side { position:fixed; top:50%; bottom:50%; vertical-align: middle; text-align:center; }
</style>
----------------------------------------------------------------------------------------
<table id="left">
<td><div align="left" valign="top" id="sidecontent">
<div class="latest">test</div>
</div></div></td><td>
<a href="#" onclick="side_content();" style="cursor:hand;" class="btn_side"><img id='_sidebtn' src="<?=$g4[path]?>/img/btn_side_close.png" border="0"></a></td>
</table>
----------------------------------------------------------------------------------------
<!-- btn_side_close.png 이미지를 클릭하면 왼쪽에서사이드컨텐츠가 사라지며 btn_side_close.png 이미지가 btn_side_open.png 이미지로 바뀐다. 또한 btn_side_open.png 이미지를 클릭하면 사이드컨텐츠가 나타나며 btn_side_close.png 이미지로 바뀐다. -->
여기서 idecontent.style.display가 block상태로 다른페이지로 넘어가도 유지되도록하고싶습니다. 어떻게 해야 유지되는지에 대해 방법을 질문합니다.
댓글 1개
배우는이군
13년 전
이런문제는 굳이 세션을 넘기시지 않아도 side_content(); 를 실행했을때
document.getElementById("test").value = "block 이나 none" 임의로 값을 넣어서
링크 가져갈때 저 vlaue 값을 가져가서 css자체에서 처리하시는게 좋을듯 한데요
document.getElementById("test").value = "block 이나 none" 임의로 값을 넣어서
링크 가져갈때 저 vlaue 값을 가져가서 css자체에서 처리하시는게 좋을듯 한데요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 230 | 20년 전 | 2038 | ||
| 229 | 20년 전 | 3131 | ||
| 228 | 20년 전 | 3322 | ||
| 227 | 20년 전 | 2384 | ||
| 226 | 20년 전 | 5458 | ||
| 225 | 20년 전 | 2508 | ||
| 224 | 20년 전 | 2953 | ||
| 223 | 20년 전 | 4196 | ||
| 222 | 20년 전 | 2596 | ||
| 221 | 20년 전 | 2278 | ||
| 220 | 20년 전 | 3666 | ||
| 219 | 20년 전 | 2063 | ||
| 218 | 20년 전 | 3552 | ||
| 217 | 20년 전 | 2469 | ||
| 216 | 20년 전 | 2897 | ||
| 215 | 20년 전 | 2205 | ||
| 214 | 20년 전 | 3326 | ||
| 213 | 20년 전 | 2909 | ||
| 212 | 20년 전 | 3040 | ||
| 211 | 20년 전 | 2139 | ||
| 210 | 20년 전 | 1870 | ||
| 209 | 20년 전 | 2333 | ||
| 208 | 20년 전 | 1962 | ||
| 207 | 20년 전 | 1666 | ||
| 206 | 20년 전 | 1849 | ||
| 205 | 20년 전 | 3939 | ||
| 204 | 20년 전 | 1669 | ||
| 203 | 20년 전 | 2002 | ||
| 202 | 20년 전 | 2343 | ||
| 201 | 20년 전 | 1814 | ||
| 200 | 20년 전 | 2943 | ||
| 199 | 20년 전 | 1997 | ||
| 198 | 20년 전 | 2077 | ||
| 197 | 20년 전 | 3641 | ||
| 196 | 20년 전 | 2965 | ||
| 195 | 20년 전 | 2085 | ||
| 194 | 20년 전 | 10229 | ||
| 193 | 20년 전 | 2235 | ||
| 192 | 20년 전 | 1581 | ||
| 191 | 20년 전 | 2652 | ||
| 190 | 20년 전 | 2281 | ||
| 189 | 20년 전 | 1673 | ||
| 188 | 20년 전 | 1464 | ||
| 187 | 20년 전 | 1896 | ||
| 186 | 20년 전 | 1694 | ||
| 185 | 20년 전 | 1730 | ||
| 184 | 20년 전 | 2327 | ||
| 183 | 20년 전 | 1538 | ||
| 182 | 20년 전 | 1473 | ||
| 181 | 20년 전 | 1613 | ||
| 180 | 20년 전 | 2708 | ||
| 179 | 20년 전 | 1787 | ||
| 178 | 20년 전 | 1841 | ||
| 177 | 20년 전 | 1967 | ||
| 176 | 20년 전 | 1792 | ||
| 175 | 20년 전 | 1864 | ||
| 174 | 20년 전 | 1686 | ||
| 173 | 20년 전 | 2054 | ||
| 172 | 20년 전 | 1776 | ||
| 171 | 20년 전 | 2551 | ||
| 170 | 20년 전 | 2257 | ||
| 169 | 20년 전 | 2537 | ||
| 168 | 20년 전 | 1464 | ||
| 167 | 20년 전 | 1564 | ||
| 166 | 20년 전 | 2140 | ||
| 165 | 20년 전 | 1605 | ||
| 164 | 20년 전 | 3749 | ||
| 163 | 20년 전 | 2643 | ||
| 162 | 20년 전 | 2064 | ||
| 161 | 20년 전 | 2769 | ||
| 160 | 20년 전 | 1717 | ||
| 159 | 20년 전 | 1593 | ||
| 158 | 20년 전 | 2543 | ||
| 157 | 20년 전 | 1471 | ||
| 156 | 20년 전 | 1714 | ||
| 155 | 20년 전 | 3222 | ||
| 154 | 20년 전 | 1877 | ||
| 153 | 20년 전 | 1607 | ||
| 152 | 20년 전 | 4934 | ||
| 151 | 20년 전 | 4560 | ||
| 150 | 20년 전 | 3499 | ||
| 149 | 20년 전 | 3770 | ||
| 148 | 20년 전 | 7051 | ||
| 147 | 20년 전 | 3535 | ||
| 146 | 20년 전 | 2602 | ||
| 145 | 20년 전 | 2597 | ||
| 144 | 20년 전 | 7159 | ||
| 143 | 20년 전 | 4583 | ||
| 142 | 20년 전 | 1889 | ||
| 141 | 20년 전 | 3246 | ||
| 140 | 20년 전 | 1945 | ||
| 139 | 20년 전 | 1539 | ||
| 138 | 20년 전 | 2289 | ||
| 137 | 20년 전 | 1769 | ||
| 136 | 20년 전 | 1446 | ||
| 135 | 20년 전 | 1778 | ||
| 134 | 20년 전 | 2959 | ||
| 133 | 20년 전 | 2429 | ||
| 132 | 20년 전 | 1703 | ||
| 131 | 20년 전 | 1629 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기