嗨,我一直在使用这个PHP echo语句
echo "<a href = 'message_delete_script_outbox.php?id=".$row['id']."'"."onclick='return
confirm(/Are you sure, you want to delete?/)'>Delete</a>";
Run Code Online (Sandbox Code Playgroud)
该声明正在工作我看到这条消息/你确定,你想删除?/而不是这个你确定,你想删除?
你的报价嵌套有点搞砸了.请尝试遵循以下规则:
"(这标志着字符串的开头和结尾)\"(转义为不标记"字符串的开头/结尾")'(文字报价)\'(将作为转义外部报价生成的文字报价)结果:
echo "<a href=\"message_delete_script_outbox.php?id=".$row['id']."\"onclick=
\"return confirm('Are you sure, you want to delete?')\">Delete</a>";
Run Code Online (Sandbox Code Playgroud)
有关报价嵌套的更多信息:http://blog.opensourceopportunities.com/2007/10/nested-nested-quotes.html
| 归档时间: |
|
| 查看次数: |
4792 次 |
| 最近记录: |