ie7 Magento下拉数量没有增值

时间:2011-12-14 11:37:00

标签: magento select internet-explorer-7 option

我添加了一个quanity字段是我们商店中drop的格式,它在firefox,chrome,ie9,ie8上运行正常,但无法获取ie7上的值。

有人可以帮忙吗?

这是代码

<?php $_product = $this->getProduct() ?>

<?php if($_product->isSaleable()): ?> 
<div class="ptyre_price floatleft botm">
    <p>
    <?php $incTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice(), 2);        
    echo $this->__( Mage::helper('core')->currency($incTax));
    ?></p><span class="price-each-text">Each</span>
</div>  
<div class="product-buttons">
<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post"     id="product_addtocart_form">
QUANTITY:

<select name="qty" id="qty" class="qty">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4" selected>4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<button class="form-button" onclick="productAddToCartForm.submit(this)"><span><?php echo    $this->__('BUY'); ?></span></button>    
</form>

</div>
<?php endif; ?>
<script type="text/javascript">
    var productAddToCartForm = new VarienForm('product_addtocart_form');
    productAddToCartForm.submit = function(inVal){
            this.form.qty.value = inVal;
            if (this.validator.validate()) {
                    this.form.submit();
            }
    }.bind(productAddToCartForm);
 </script>

1 个答案:

答案 0 :(得分:0)

假设这与javascript无关 - 您是否尝试将selected属性更改为selected="selected"