duanquanzhi5560 2016-01-29 18:01
浏览 36

如何限制客户的选择

This is an item in my store. Each item can be purchased with five different options. Currently, the user can buy an item with all the possibilities and I want to limit his choice to two out of five. Please give suggestions on how to sink this and can I use php or I need to use JavaScript.

So is this, but now follows a code block:

if($check_item_ok[8] == '0') { // 0 for Weapons Pendants
            if($item_exc >= '1') {echo'
                            <div class="opt_title">Increases Mana After monster +Mana/8</div>
                            <div class="opt"><input id="ex1" onclick="checkall();" ame="boxes" value="1" type="checkbox"></div>
            ';};
            if($item_exc >= '2') { echo'
                            <div class="opt_title">Increases Life After monster +Life/8</div>
                            <div class="opt"><input id="ex2" onclick="checkall();" ame="boxes" value="2" type="checkbox"></div>
            ';};
            if($item_exc >= '3') { echo'
                            <div class="opt_title">Increase attacking(wizardly)speed+7</div>
                            <div class="opt"><input id="ex3" onclick="checkall();" ame="boxes" value="3" type="checkbox"></div>
            ';};
            if($item_exc >= '4') { echo'
                            <div class="opt_title">Increase Damage +2%</div>
                            <div class="opt"><input id="ex4" onclick="checkall();" ame="boxes" value="4" type="checkbox"></div>
            ';};
            if($item_exc >= '5') { echo'
                            <div class="opt_title">Increase Damage +level/20</div>
                            <div class="opt"><input id="ex5" onclick="checkall();" ame="boxes" value="5" type="checkbox"></div>
            ';};
            if($item_exc >= '6') { echo'
                            <div class="opt_title">Excellent Damage Rate +10%</div>
                            <div class="opt"><input id="ex6" onclick="checkall();" ame="boxes" value="6" type="checkbox"></div>
            ';};
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类