在IF和ELSE语句之后我需要POP up窗口

时间:2011-02-21 17:57:59

标签: php popup

我需要在IF和Else语句之后弹出窗口我的代码。

else if ($selected_radio=='q1yes' && $status=='yes' && $bus=='retail' && $retail=='retailyes' && $phonetype=='dsl' && $checks=='checkyes'    ) {
$q1yes_status = 'checked';
$yes_status = 'checked';
$service_status='checked';
$autorepair_status='checked';
$analog_status='checked';
$checkyes_status='checked';
echo "your answer is yes yes retail autorepair dsl yes"; <<<< --- that text should change pop up window URL like "http://formsignup.php" instead of text message. I'm not sure if that possible to do Pop up inside ECHO.

我感谢你的帮助!

3 个答案:

答案 0 :(得分:1)

回显一些javascript代码,然后当页面被发送到浏览器时,浏览器将触发javascript代码,导致弹出窗口显示:

echo "<script>alert('your answer is yes yes retail autorepair dsl yes');</script>";

例如:

答案 1 :(得分:1)

POP上传窗口是否会完成JavaScript?

那么你想要一个POP up窗口,你可以回显/打印所需的JavaScript吗?

使用像......这样的代码。

window.open("http://formsignup.php","Window Name",width=430,height=360");

此代码可以包含在文档的HEAD中,然后在主体中调用。

或者这可以全部放在身体里......就像...

<script language="JavaScript">
window.open("http://formsignup.php","Window Name",width=430,height=360");
</script>

答案 2 :(得分:0)

你可以回复一些加载新窗口的javascript吗?

echo "<script>window.open('url to open','window name');</script>";