php和js交互一例-PHP教程,PHP应用
2018-09-07 14:44
复制代码 代码如下:
<html>
<head>
<metahttp-equiv=Content-Typecontent=text/html;charset=gb2312>
<title>Untitled</title>
<scriptlanguage=javascript>
<!--
functionrec_delete(message){
returnconfirm(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>;
echodelete_mess=\$dele_mess\;
echo<\/script>;
?>
<ahref=<?phpecho$PHP_SELF?opt=delete;?>onClick=returnrec_delete(delete_mess)>删除</a>
</body>
</html>
文章标题:php和js交互一例-PHP教程,PHP应用
文章链接:http://soscw.com/index.php/essay/13816.html