제목을 눌러 링크로 이동하기전에 정보
제목을 눌러 링크로 이동하기전에본문
최근게시물에서 게시물클릭시 바로 링크1로 이동하는데요
눌러서 이동하기 전에 확인창 띄울려면 어떻게 작성하나요?ㅠㅠ
<?
echo "<a href=\"{$list[$i]['wr_link1']}\">";
?>
이런식으로 불러오고있고요~
자바를 예를 들어서
<script>
function linkfunction1()
{
if(confirm("정말로 이동 하시겠습니까?"))
if (navigator.appName == "Netscape") {
location.replace("http://naver.com")
}else{
window.location.href = "http://naver.com" //여기는 링크1로 하고싶고요~
}
else
window.location.href = http://daum.net; // 취소 클릭시 다시 리턴.ㅠㅠ
}
</script>
이렇게 불러오고 싶습니다~
눌러서 이동하기 전에 확인창 띄울려면 어떻게 작성하나요?ㅠㅠ
<?
echo "<a href=\"{$list[$i]['wr_link1']}\">";
?>
이런식으로 불러오고있고요~
자바를 예를 들어서
<script>
function linkfunction1()
{
if(confirm("정말로 이동 하시겠습니까?"))
if (navigator.appName == "Netscape") {
location.replace("http://naver.com")
}else{
window.location.href = "http://naver.com" //여기는 링크1로 하고싶고요~
}
else
window.location.href = http://daum.net; // 취소 클릭시 다시 리턴.ㅠㅠ
}
</script>
이렇게 불러오고 싶습니다~
댓글 전체
echo "<a href=\"javascript:linkfunction1(\'" . $list[$i]['wr_link1'] . "\');\">";
<script>
function linkfunction1(data) {
if ( confirm("정말로 이동 하시겠습니까?") ) {
if (navigator.appName == "Netscape") {
location.replace(data) ;
}else{
window.location.href = data; //여기는 링크1로 하고싶고요~
}
} else {
//window.location.href = http://daum.net; // 취소 클릭시 다시 리턴.ㅠㅠ
history.go(-1);
}
}
</script>
요런식으로 하면 될 것 같네여...^^
<script>
function linkfunction1(data) {
if ( confirm("정말로 이동 하시겠습니까?") ) {
if (navigator.appName == "Netscape") {
location.replace(data) ;
}else{
window.location.href = data; //여기는 링크1로 하고싶고요~
}
} else {
//window.location.href = http://daum.net; // 취소 클릭시 다시 리턴.ㅠㅠ
history.go(-1);
}
}
</script>
요런식으로 하면 될 것 같네여...^^