alert에 입력값을 넣을 수 있나요? 정보
alert에 입력값을 넣을 수 있나요?본문
안녕하세요.
update파일에 자바스크립트를 넣었습니다.
<script>
alert("글이 등록되었습니다.");
history.back(-2);
location.href="/bbs/write.php?bo_table=apply";
</script>
alert에 현재 글이 등록되었습니다.로 되어있는데
이 부분에 wr_1이 등록되었습니다. 로 바꾸고 싶은데
출력이 되지 않습니다. alert에 추가필드에 입력한 내용을 출력할 수 있을까요?
update파일에 자바스크립트를 넣었습니다.
<script>
alert("글이 등록되었습니다.");
history.back(-2);
location.href="/bbs/write.php?bo_table=apply";
</script>
alert에 현재 글이 등록되었습니다.로 되어있는데
이 부분에 wr_1이 등록되었습니다. 로 바꾸고 싶은데
출력이 되지 않습니다. alert에 추가필드에 입력한 내용을 출력할 수 있을까요?
댓글 전체
// 경고메세지를 경고창으로
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script type='text/javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url($url);
exit;
}
그냥 그누보드의 펑션 사용하는게 편하실듯 하네요
=> alert($wr_1) 요런식??
function alert($msg='', $url='')
{
global $g4;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
//header("Content-Type: text/html; charset=$g4[charset]");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4[charset]\">";
echo "<script type='text/javascript'>alert('$msg');";
if (!$url)
echo "history.go(-1);";
echo "</script>";
if ($url)
// 4.06.00 : 불여우의 경우 아래의 코드를 제대로 인식하지 못함
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url($url);
exit;
}
그냥 그누보드의 펑션 사용하는게 편하실듯 하네요
=> alert($wr_1) 요런식??