onclick 함수 질문입니다 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

onclick 함수 질문입니다 정보

onclick 함수 질문입니다

본문

function iconGallery($bo_table)
{
   global $g4;
    // 해당 시간
    $datetime = date("Y-m-d H:i:s", $g4['server_time'] - (1 * 86400));
    // 데이터
    $menu = sql_fetch(" select wr_id from {$g4['write_prefix']}{$bo_table} where wr_is_comment = '0' and wr_datetime >= '$datetime' order by wr_num limit 0, 1 ");
    // 체크
    if ($menu['wr_id']) {
        // 아이콘 출력
        $icon = " <img src='{$g4['path']}/img/newgallery.gif' align='absmiddle'>";
    } else {
        $icon = "";
    }
    return $icon;
}



///  원래 소스입니다. 여기서 빨갛게 칠한 부분에 링크를 걸고 싶어요
  newgallery.gif 를 출력하는 것에 부가적으로 저걸 누르면 특정 URL 로 이동하게 하고 싶은데요
 어떻게 수정해야 하나요?


  • 복사

댓글 전체

$icon = "&nbsp;<img src='{$g4['path']}/img/newgallery.gif' align='absmiddle'>";

=>

$icon = "&nbsp;<img src='{$g4['path']}/img/newgallery.gif' align='absmiddle' onclick=\"location.href='특정주소';\" style='cursor:hand;'>";
© SIRSOFT
현재 페이지 제일 처음으로