PHP 中用JAVA script中的Confirm,为什么页面背景变成白板?想在点击 "确定 "时,去别的页面做一个删除动作,可是还没有点击确定,背景已经成白色(弹出确认框时已经是白板了) echo " "; <br /> echo "var record_id = '$record_id '; "; <br /> echo "if(window.confirm( 'Delete files failed? ') == true) "; <br /> echo "{ "; <br /> echo "urlString= 'deleteUser.php?recordId= '; "; <br /> echo "urlString+=record_id; "; <br /> echo "window.location.href=urlString; "; <br /> echo "} ";<br><br /><font color='#e78608'>------解决方案--------------------<br />你的js好像都没完成。 <br /> 白板是什么意思?这段js前本来就没输出当然是空白的。 <br /> 看看下面是不是你要的。 <br /> <br /> echo < < <EOF <br /> <script language= 'javascript '> <br /> var record_id = '{$record_id} '; <br /> if( false !== confirm( 'Delete files failed? ') ) <br /> { <br /> urlString= 'deleteUser.php?recordId= '; <br /> urlString+=record_id; <br /> window.location.href=urlString; <br /> } <br /> EOF;