|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Untitled</title>
<script language="Javascript">
<!--
function rec_delete(message){
return confirm(message);
}
//-->
</script>
</head>
<body>
<?php
$myrow[guest_name]="asdf/"";
$myrow[guest_name]="asdf'";
$guest_name=addslashes($myrow[guest_name]);
//$guest_name=str2js($myrow[guest_name],"'");
$dele_mess="真的要刪除這個留言嗎?/n留言姓名:$guest_name($myrow[guest_ip])"."/n留言時間:$myrow[guest_time]";
echo "<script>";
echo "delete_mess=/"$dele_mess/"";
echo "<//script>";
?>
<a href="<?php echo "$php_SELF?opt=delete"; ?>" onClick='return rec_delete(delete_mess)'>刪除</a>
</body>
</html>
php技術(shù):php和js交互一例-PHP教程,PHP應(yīng)用,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。