<?php echo date("Y-m-d H:i:s")?> <input name="board_IP" type="hidden" id="board_IP" value="<?php echo "$userIP";?>" /> alert("文本")确认框 window.alert(欢迎访问我们的 Web 页!); <?php echo "<mce:script language=/"JavaScript/"><!-- alert(/"你好/"); // --></mce:script>"; ?> 或者 <?php print "<mce:script language=/"JavaScript/"><!-- alert(/"你好/"); // --></mce:script>"; ?> 2. 如果需要php弹出对话框之后返回原来页面可以这么写 <?php echo "<mce:script language=/"JavaScript/"><!-- /r/n"; echo " alert(/"你好/");/r/n"; echo " history.back();/r/n"; echo " // --></mce:script>"; exit; ?> 或者 <?php print "<mce:script language=/"JavaScript/"><!-- /r/n"; print " alert(/"你好/");/r/n"; print " history.back();/r/n"; print " // --></mce:script>"; exit; ?>