【发布时间】:2015-04-23 08:17:17
【问题描述】:
我想使用 alert() 显示一条消息
$message = "No result found for the following info:Name: ".$FullName."IC: ".$ID." in database.";
echo "<script>alert('".$message."'); window.history.back();</script>";
这是可行的,但如果我在消息中添加新行 '\n'
$message = "No result found for the following info:\nName: ".$FullName."\nIC: ".$ID." in database.";
它不会显示弹出消息。有什么问题?
【问题讨论】:
-
查看页面源代码,这些行的 html 输出是什么?有实时链接吗?
标签: javascript php string