자바스크립트 관련 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자체에서 처리하시는게 좋을듯 한데요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 630 | 19년 전 | 2334 | ||
| 629 |
|
19년 전 | 1998 | |
| 628 |
|
19년 전 | 3107 | |
| 627 |
|
19년 전 | 2013 | |
| 626 |
|
19년 전 | 2059 | |
| 625 |
|
19년 전 | 1708 | |
| 624 |
|
19년 전 | 2209 | |
| 623 | 19년 전 | 2187 | ||
| 622 |
|
19년 전 | 2494 | |
| 621 |
|
19년 전 | 2884 | |
| 620 |
|
19년 전 | 2390 | |
| 619 | 19년 전 | 2456 | ||
| 618 | 19년 전 | 3503 | ||
| 617 |
|
19년 전 | 3220 | |
| 616 |
|
19년 전 | 3209 | |
| 615 |
|
19년 전 | 3022 | |
| 614 |
|
19년 전 | 2031 | |
| 613 |
|
19년 전 | 2358 | |
| 612 |
|
19년 전 | 2227 | |
| 611 |
|
19년 전 | 2068 | |
| 610 |
|
19년 전 | 2503 | |
| 609 |
|
19년 전 | 2415 | |
| 608 |
|
19년 전 | 2803 | |
| 607 | 19년 전 | 2182 | ||
| 606 | 19년 전 | 3508 | ||
| 605 | 19년 전 | 1976 | ||
| 604 | 19년 전 | 2578 | ||
| 603 | 19년 전 | 1603 | ||
| 602 |
|
19년 전 | 2828 | |
| 601 | 19년 전 | 3069 | ||
| 600 |
|
19년 전 | 2152 | |
| 599 | 19년 전 | 1992 | ||
| 598 | 19년 전 | 2466 | ||
| 597 | 19년 전 | 2380 | ||
| 596 |
|
19년 전 | 3068 | |
| 595 |
|
19년 전 | 6744 | |
| 594 | 19년 전 | 2703 | ||
| 593 | 19년 전 | 3180 | ||
| 592 |
|
19년 전 | 3080 | |
| 591 |
|
19년 전 | 1920 | |
| 590 | 19년 전 | 3360 | ||
| 589 | 19년 전 | 2200 | ||
| 588 |
|
19년 전 | 2699 | |
| 587 | 19년 전 | 2341 | ||
| 586 |
|
19년 전 | 4352 | |
| 585 | 19년 전 | 2473 | ||
| 584 | 19년 전 | 2743 | ||
| 583 |
|
19년 전 | 3508 | |
| 582 |
|
19년 전 | 3709 | |
| 581 |
|
19년 전 | 3237 | |
| 580 | 19년 전 | 2471 | ||
| 579 | 19년 전 | 3051 | ||
| 578 | 19년 전 | 3939 | ||
| 577 | 19년 전 | 3790 | ||
| 576 | 19년 전 | 1729 | ||
| 575 |
|
19년 전 | 2193 | |
| 574 |
|
19년 전 | 5398 | |
| 573 | 19년 전 | 6704 | ||
| 572 | 19년 전 | 2552 | ||
| 571 | 19년 전 | 2101 | ||
| 570 | 19년 전 | 2596 | ||
| 569 | 19년 전 | 3275 | ||
| 568 | 19년 전 | 3510 | ||
| 567 | 19년 전 | 2979 | ||
| 566 | 19년 전 | 2590 | ||
| 565 |
|
19년 전 | 4706 | |
| 564 |
|
19년 전 | 6716 | |
| 563 |
|
19년 전 | 4983 | |
| 562 |
|
19년 전 | 5938 | |
| 561 |
|
19년 전 | 2677 | |
| 560 |
|
19년 전 | 2512 | |
| 559 |
|
19년 전 | 2211 | |
| 558 |
|
19년 전 | 2291 | |
| 557 | 19년 전 | 4586 | ||
| 556 |
|
19년 전 | 4651 | |
| 555 | 19년 전 | 2492 | ||
| 554 | 19년 전 | 2168 | ||
| 553 | 19년 전 | 2506 | ||
| 552 |
|
19년 전 | 3142 | |
| 551 | 19년 전 | 2928 | ||
| 550 |
|
19년 전 | 1886 | |
| 549 |
|
19년 전 | 1948 | |
| 548 |
|
19년 전 | 3135 | |
| 547 |
|
19년 전 | 2355 | |
| 546 |
|
19년 전 | 3609 | |
| 545 |
|
19년 전 | 2534 | |
| 544 |
|
19년 전 | 1843 | |
| 543 |
|
19년 전 | 2448 | |
| 542 |
|
19년 전 | 1714 | |
| 541 |
|
19년 전 | 1398 | |
| 540 |
|
19년 전 | 1525 | |
| 539 |
|
19년 전 | 1792 | |
| 538 |
|
19년 전 | 1569 | |
| 537 |
|
19년 전 | 1768 | |
| 536 |
|
19년 전 | 1554 | |
| 535 |
|
19년 전 | 1952 | |
| 534 |
|
19년 전 | 1837 | |
| 533 |
|
19년 전 | 1434 | |
| 532 |
|
19년 전 | 1435 | |
| 531 |
|
19년 전 | 1349 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기