답변 4개
그누보드 기본 함수중에 alert()가 있습니다.
Copy
echo "<script type='text/javascript'>alert('$message');</script>";
대신
Copy
alert($message);
라고 해서 처리해보세요.
다음은 lib/common.lib.php의 내용입니다. 참고로 alert_close()도 있습니다.
Copy
// 경고메세지를 경고창으로function alert($msg='', $url='', $error=true, $post=false){ global $g5, $config, $member; global $is_admin; if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.'; $header = ''; if (isset($g5['title'])) { $header = $g5['title']; } include_once(G5_BBS_PATH.'/alert.php'); exit;}// 경고메세지 출력후 창을 닫음function alert_close($msg, $error=true){ global $g5; $header = ''; if (isset($g5['title'])) { $header = $g5['title']; } include_once(G5_BBS_PATH.'/alert_close.php'); exit;}
답변을 작성하려면 로그인이 필요합니다.