使用php禁用按钮,不工作
有人能推荐我使用的osclass开源软件吗。 我不知道为什么条件不起作用使用php禁用按钮,不工作,php,html,css,mysqli,Php,Html,Css,Mysqli,有人能推荐我使用的osclass开源软件吗。 我不知道为什么条件不起作用 <button type="button" class="button-ii" <?php if(osc_item_formated_price()=="Only Information Available" || $email == "OFF") {?> disabled="true" <?php } ?><?php>data-toggle="modal"disabled da
<button type="button" class="button-ii" <?php if(osc_item_formated_price()=="Only Information Available" || $email == "OFF") {?> disabled="true" <?php } ?><?php>data-toggle="modal"disabled data-target="#myModal">Enquiry</button>
试着用不同的方法来做
<?php if(osc_item_formated_price()=="Only Information Available" || $email == "OFF") { ?>
<button type="button" class="button-ii" disabled>Enquiry</button>
<?php } else { ?>
<button type="button" class="button-ii" data-toggle="modal" data-target="#myModal">Enquiry</button>
<?php } ?>
询问
询问
或
因为您在使用PHP代码时做了错误的操作,所以您有一个额外的disabled=“true”>data toggle=“modal”disabled data target=“#myModal”>查询
欢迎来到SO,您尝试了哪些方法来实现您想要的结果?关于你的问题,你的研究表明了什么?你能提供你的代码吗?如有需要,请提供一份表格。也请花时间阅读
<?php if(osc_item_formated_price()=="Only Information Available" || $email == "OFF") {
echo '<button type="button" class="button-ii" disabled>Enquiry</button>';
} else {
echo '<button type="button" class="button-ii" data-toggle="modal" data-target="#myModal">Enquiry</button>';
}
<button type="button" class="button-ii"
<?php if(osc_item_formated_price()=="Only Information Available" || $email == "OFF")
{?> disabled="true" <?php } ?> >data-toggle="modal"disabled data-target="#myModal">Enquiry</button>