php和js交互一例-PHP教程,PHP应用分享


代码如下:
<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>

—-想了解更多的linux相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>



本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/jspttutorial/68222.html

(0)
上一篇 2020年4月18日
下一篇 2020年4月18日

精彩推荐