当用 PHP 编写的语句起作用时,我将如何制作警报框弹出窗口?
我现在要做的 JS 代码是这样的:
$(".bAlert").click( function() {
jAlert('This is a custom alert box. Title and this text can be easily editted', 'Alert Dialog Sample');
});
此代码在将其用于按钮时工作正常,但我希望它在此语句起作用时显示:
if ($operation == "divide") {
$answer = $number1 / $number2;
$operation = "÷";
} else {
$output = "CODE TO MAKE THIS WORK HAS TO GO HERE";
}
这是使用按钮的工作方式:
<input type="button" value="Usual alert" class="basicBtn mr10 ml10 bAlert" />