Jquery在Firefox中无法正常工作,但在IE和Chrome中运行良好

时间:2014-01-24 17:58:20

标签: jquery google-chrome firefox

这段代码

var eFileUpgradePrice0 = $("label[for=" + eFileRadioIDarray[0]).text();
eFileUpgradePrice0 = regExp.exec(eFileUpgradePrice0);

if($("#" + eFileRadioIDarray[0]).is(":checked")) {
  price = parseFloat(price) + parseFloat(eFileUpgradePrice0[1]);
}

$('#eFileBlock .priceTag').html('+ ' + parseFloat(eFileUpgradePrice0[1]));

这段代码在Chrome和Internet Explorer中运行良好,但在Firefox中,它不起作用。 Firebug给了我这个错误 -

TypeError: eFileUpgradePrice0 is null
http://advancedmicrosolutions.net/index.php?route=product/product&path=62&product_id=50
Line 715

我真的不确定为什么它在Firefox中失败了。

以下是代码的全部内容......

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html dir="ltr" lang="en">
<head>
<meta charset="UTF-8" />
<title>2014 - W-2 / 1099 Forms Filer</title>
<base href="http://advancedmicrosolutions.net/" />
<link href="http://advancedmicrosolutions.net/image/data/cart.png" rel="icon" />
<link href="http://advancedmicrosolutions.net/index.php?route=product/product&amp;product_id=54" rel="canonical" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/amsTheme/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/amsTheme/stylesheet/ams.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />

<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>


<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />

<script type="text/javascript" src="catalog/view/javascript/colorbox-master/jquery.colorbox.js"></script>

<script type="text/javascript" src="catalog/view/javascript/common.js"></script>

<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox-min.js"></script>
<!--[if IE 7]> 
<link rel="stylesheet" type="text/css" href="catalog/view/theme/amsTheme/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/amsTheme/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->


</head>
<body>
<div id="container">
<div id="header">
    <div id="logo"><a href="http://www.advancedmicrosolutions.net/wordpress/"><img src="http://advancedmicrosolutions.net/image/data/logo.png" title="Advanced Micro Solutions" alt="Advanced Micro Solutions" /></a></div>
        <div id="cart">
  <div class="heading">
    <h4>Shopping Cart</h4>
    <a><span id="cart-total">0 item(s) - $0.00</span></a></div>
  <div class="content">
        <div class="empty">Your shopping cart is empty!</div>
      </div>
</div>  <div id="search">
    <div class="button-search"></div>
    <input type="text" name="search" placeholder="Search" value="" />
  </div>
  <div id="welcome">
        Welcome visitor you can <a href="http://advancedmicrosolutions.net/index.php?route=account/login">login</a> or <a href="http://advancedmicrosolutions.net/index.php?route=account/register">create an account</a>.      </div>
  <div class="links">
    <a href="http://www.advancedmicrosolutions.net/wordpress/">Home</a>
    <a href='index.php?route=product/category&path=62'>Order Now</a>
    <a href='http://www.advancedmicrosolutions.net/wordpress/'>Our Software</a>
    <a href='http://www.advancedmicrosolutions.net/wordpress/'>Support</a>
    <a href='index.php?route=information/information&information_id=4'>About Us</a>
    <a href='http://www.advancedmicrosolutions.net/wordpress'>Sitemap</a>
    <a href="http://advancedmicrosolutions.net/index.php?route=account/account">My Account</a>
    <a href="http://advancedmicrosolutions.net/index.php?route=checkout/checkout">Checkout</a>
  </div>
</div>
<div id="notification"></div>
<div id="outterContent">

<!--
<pre>
</pre>
-->
<div id="content">  <div class="breadcrumb">
        <a href="http://advancedmicrosolutions.net/index.php?route=common/home">Home</a>
         &raquo; <a href="http://advancedmicrosolutions.net/index.php?route=product/category&amp;path=62">AMS Software</a>
         &raquo; <a href="http://advancedmicrosolutions.net/index.php?route=product/product&amp;path=62&amp;product_id=54">2014 - W-2 / 1099 Forms Filer</a>
      </div>
  <h1>2014 - W-2 / 1099 Forms Filer</h1>
  <div class="product-info">
        <div class="left">
            <div class="image"><a href="http://advancedmicrosolutions.net/image/cache/data/readers-choice-logo-2014-500x500.jpg" title="2014 - W-2 / 1099 Forms Filer" class="colorbox"><img src="http://advancedmicrosolutions.net/image/cache/data/readers-choice-logo-2014-228x228.jpg" title="2014 - W-2 / 1099 Forms Filer" alt="2014 - W-2 / 1099 Forms Filer" id="image" /></a></div>
                  <div class="image-additional">
                <a href="http://advancedmicrosolutions.net/image/cache/data/formEntry-500x500.jpg" title="2014 - W-2 / 1099 Forms Filer" class="colorbox"><img src="http://advancedmicrosolutions.net/image/cache/data/formEntry-74x74.jpg" title="2014 - W-2 / 1099 Forms Filer" alt="2014 - W-2 / 1099 Forms Filer" /></a>
                <a href="http://advancedmicrosolutions.net/image/cache/data/readers-choice-logo-2014-500x500.jpg" title="2014 - W-2 / 1099 Forms Filer" class="colorbox"><img src="http://advancedmicrosolutions.net/image/cache/data/readers-choice-logo-2014-74x74.jpg" title="2014 - W-2 / 1099 Forms Filer" alt="2014 - W-2 / 1099 Forms Filer" /></a>
              </div>
          </div>
        <div class="right">
      <div class="description">
                <span>Product Code:</span> 2014-1099-FormsFiler<br />
                <span>Availability:</span> In Stock</div>
      <input type='hidden' name='baseprice' id='baseprice' value='$79.00' />
      <div class="price" id='priceBlock'>Price:                $79.00                <br />
                              </div>


<!-- CONTROL BOARD -->


<div id='controlBoard'>
  <div id='laserGenerationBlock' style='display: block; border: 1px solid lightgrey; padding: 10px; margin: 10px; width:auto;'>
    <input type='checkbox' name='selectLaser' id='selectLaser' value='1' />
    <label for='selectLaser' style='font-weight: bold;'>Software Generated Forms <small>(formerly Laser Generation)</small></label>
    <div class='priceTag' style='font-weight: bold; font-size: 14px; display: inline-block; float:right; text-align: right;'>+ $75</div>
    <div class='descriptiveText' style='padding-top: 10px;'>With Software Generated Forms, you can print the employer/payer and employee/recipient copies on plain white paper. No need to buy preprinted forms. The only forms you will need to purchase are Copy A of the 1099, and the 1096. If you file electronically, you can even eliminate the cost of Copy A forms.</div>
  </div>

<div id='amsPayrollBlock' style='display: block; border: 1px solid lightgrey; padding: 10px; margin: 10px; width:auto;'>
    <input type='checkbox' name='selectAMSpayroll' id='selectAMSpayroll' value='1'  /> 
    <label for='selectAMSpayroll' style='font-weight: bold;'>AMS Payroll (Formerly A-T-F Payroll Option)</label>
    <div class='priceTag' style='font-weight: bold; font-size: 14px; display: inline-block; float:right; text-align: right;'>+ $105</div>
    <div class='descriptiveText' style='padding-top: 10px;'>AMS Payroll allows you to enter payroll and non-employee compensation information by check throughout the year. It provides for the printing of most State quarterly Wage Reports plus the 940, 941, 943, W-2 and 1099-Misc forms.</div>
  </div>

<div id='eFileBlock' style='display: block; border: 1px solid lightgrey; padding: 10px; margin: 10px; width:auto;'>
    <input type='checkbox' name='selectEfile' id='selectEfile' value='1' />
    <label for='selectEfile' style='font-weight: bold;'>E-File Direct</label>
    <div class='priceTag' style='font-weight: bold; font-size: 14px; display: inline-block; float:right; text-align: right;'>+ $105</div>
    <div class='descriptiveText' style='padding-top: 10px;'>
      There are two ways to E-File using 1099-Etc:<br />

      E-File Direct e-files an unlimited number of forms with the IRS/SSA for a single purchase price<br />
      Click here to view important information for DEADLINES and REQUIRED TRANSMITTER CODES.<br />

      E-File Services is an alternative to E-File Direct that has no purchase price but is priced per form filed.<br />
      Purchase of E-File Direct is NOT required to use E-File Services.
    </div>
  </div>

<div id='formsFilerBlock' style='display: block; border: 1px solid lightgrey; padding: 10px; margin: 10px; width:auto;'>
    <input type='checkbox' name='selectFormsFiler' id='selectFormsFiler' value='1' />
    <label for='selectFormsFiler' style='font-weight: bold;'>Forms Filer Plus</label>
    <div class='priceTag' style='font-weight: bold; font-size: 14px; display: inline-block; float:right; text-align: right;'>+ $45</div>
    <div class='descriptiveText' style='padding-top: 10px;'>Forms Filer Plus allows for quick and easy forms filling. It's like having an electronic typewriter with all the forms built in. Choose the form that you would like to work with, and a blank version of that form comes up on the screen ready to be completed with numbers you have already prepared. Fill in your information and print the form, its that easy!</div>
  </div>


</div>
<br />



<!-- CONTROL BOARD -->


      <div class="options" style='display: none;'>
        <h2>Available Options</h2>
        <br />
                                <div id="option-240" class="option">
                    <span class="required">*</span>
                    <b>Filing Module:</b><br />
                    <input type="radio" name="option[240]" value="47" id="option-value-47" />
          <label for="option-value-47">E-File Direct                        (+$109.00)
                      </label>
          <br />
                    <input type="radio" name="option[240]" value="48" id="option-value-48" />
          <label for="option-value-48">No Thank You                      </label>
          <br />
                  </div>





        <br />
                                                                                                        <div id="option-241" class="option">
                    <span class="required">*</span>
                    <b>Payroll and Printing Modules:</b><br />
                    <input type="radio" name="option[241]" value="50" id="option-value-50" />
          <label for="option-value-50">AMS Payroll Only                        (+$129.00)
                      </label>
          <br />
                    <input type="radio" name="option[241]" value="51" id="option-value-51" />
          <label for="option-value-51">Software Generated Forms Only                        (+$79.00)
                      </label>
          <br />
                    <input type="radio" name="option[241]" value="52" id="option-value-52" />
          <label for="option-value-52">AMS Payroll and Software Generated Forms Together                        (+$208.00)
                      </label>
          <br />
                    <input type="radio" name="option[241]" value="49" id="option-value-49" />
          <label for="option-value-49">No Thank You                      </label>
          <br />
                  </div>


        <br />
                                                                                                        <div id="option-242" class="option">
                    <span class="required">*</span>
                    <b>Forms Filer Plus:</b><br />
                    <input type="radio" name="option[242]" value="54" id="option-value-54" />
          <label for="option-value-54">Forms Filer Plus                        (+$49.00)
                      </label>
          <br />
                    <input type="radio" name="option[242]" value="53" id="option-value-53" />
          <label for="option-value-53">No Thank You                      </label>
          <br />
                  </div>

        <br />
                                                                                      </div>
            <div class="cart">
        <div>Qty:          <input type="text" name="quantity" size="2" value="1" />
          <input type="hidden" name="product_id" size="2" value="54" />
          &nbsp;
          <input type="button" value="Add to Cart" id="button-cart" class="button" />
          <span>&nbsp;&nbsp;- OR -&nbsp;&nbsp;</span>
          <span class="links"><a onclick="addToWishList('54');">Add to Wish List</a><br />
            <a onclick="addToCompare('54');">Add to Compare</a></span>
        </div>

  <div id="tab-description" class="tab-content">

    <div class="buttons">
      <div class="right"><a id="button-review" class="button">Continue</a></div>
    </div>
  </div>

                        <a onclick="addToCart('57');" class="button">Add to Cart</a></div>
          </div>
  </div>
      </div>
<script type="text/javascript"><!--
$(document).ready(function() {
    $('.colorbox').colorbox({
        overlayClose: true,
        opacity: 0.5,
        rel: "colorbox"
    });
});
//--></script> 
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
    $.ajax({
        url: 'index.php?route=checkout/cart/add',
        type: 'post',
        data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
        dataType: 'json',
        success: function(json) {
            $('.success, .warning, .attention, information, .error').remove();

            if (json['error']) {
                if (json['error']['option']) {
                    for (i in json['error']['option']) {
                        $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
                    }
                }
            } 

            if (json['success']) {
                $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/amsTheme/image/close.png" alt="" class="close" /></div>');

                $('.success').fadeIn('slow');

                $('#cart-total').html(json['total']);

                $('html, body').animate({ scrollTop: 0 }, 'slow'); 
            }   
        }
    });
});
//--></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
    $('#review').fadeOut('slow');

    $('#review').load(this.href);

    $('#review').fadeIn('slow');

    return false;
});         

$('#review').load('index.php?route=product/product/review&product_id=54');

$('#button-review').bind('click', function() {
    $.ajax({
        url: 'index.php?route=product/product/write&product_id=54',
        type: 'post',
        dataType: 'json',
        data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
        beforeSend: function() {
            $('.success, .warning').remove();
            $('#button-review').attr('disabled', true);
            $('#review-title').after('<div class="attention"><img src="catalog/view/theme/amsTheme/image/loading.gif" alt="" /> Please Wait!</div>');
        },
        complete: function() {
            $('#button-review').attr('disabled', false);
            $('.attention').remove();
        },
        success: function(data) {
            if (data['error']) {
                $('#review-title').after('<div class="warning">' + data['error'] + '</div>');
            }

            if (data['success']) {
                $('#review-title').after('<div class="success">' + data['success'] + '</div>');

                $('input[name=\'name\']').val('');
                $('textarea[name=\'text\']').val('');
                $('input[name=\'rating\']:checked').attr('checked', '');
                $('input[name=\'captcha\']').val('');
            }
        }
    });
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
$(document).ready(function() {
    if ($.browser.msie && $.browser.version == 6) {
        $('.date, .datetime, .time').bgIframe();
    }

    $('.date').datepicker({dateFormat: 'yy-mm-dd'});
    $('.datetime').datetimepicker({
        dateFormat: 'yy-mm-dd',
        timeFormat: 'h:m'
    });
    $('.time').timepicker({timeFormat: 'h:m'});
});
//--></script> 








<script>


  $(function(){
    // Make the options radio buttons invisible
//    $(".options").hide();

    // Create the 'Easy to use' interface
    var eFileDirectContainerID  = document.getElementsByClassName("option")[0].id;
    var payrollLaserContainerID = document.getElementsByClassName("option")[1].id;
    var formsFilerContainerID   = document.getElementsByClassName("option")[2].id;

    var eFileRadioIDarray = new Array();
    var payrollLaserRadioIDarray = new Array();
    var formsFilerRadioIDarray = new Array();

    $("#" + eFileDirectContainerID + " input:radio").each(function (index) {
      eFileRadioIDarray[index] = $(this)[0].id;
    });

    $("#" + payrollLaserContainerID + " input:radio").each(function (index) {
      payrollLaserRadioIDarray[index] = $(this)[0].id;
    });

    $("#" + formsFilerContainerID + " input:radio").each(function (index) {
      formsFilerRadioIDarray[index] = $(this)[0].id;
    });

    // Set up the defaults
    document.getElementById(eFileRadioIDarray[eFileRadioIDarray.length - 1]).checked = true;
    document.getElementById(payrollLaserRadioIDarray[payrollLaserRadioIDarray.length - 1]).checked = true;
    document.getElementById(formsFilerRadioIDarray[formsFilerRadioIDarray.length - 1]).checked = true;

    priceUpdate();

//    alert(eFileRadioIDarray[eFileRadioIDarray.length - 1]);

    $("input").change(function() {

      if($('#selectEfile').attr("checked")) {      
        document.getElementById(eFileRadioIDarray[0]).checked = true;
      }
      else {
        document.getElementById(eFileRadioIDarray[1]).checked = true;
      }

      if($('#selectAMSpayroll').attr("checked") && $('#selectLaser').attr('checked')) {
        document.getElementById(payrollLaserRadioIDarray[2]).checked = true;
      }
      if(! $('#selectAMSpayroll').attr("checked") && ! $('#selectLaser').attr('checked')) {
        document.getElementById(payrollLaserRadioIDarray[3]).checked = true;
      }
      if($('#selectAMSpayroll').attr("checked") && ! $('#selectLaser').attr('checked')) {
        document.getElementById(payrollLaserRadioIDarray[0]).checked = true;
      }
      if(! $('#selectAMSpayroll').attr("checked") && $('#selectLaser').attr('checked')) {
        document.getElementById(payrollLaserRadioIDarray[1]).checked = true;
      }

      if($('#selectFormsFiler').attr("checked")) {      
        document.getElementById(formsFilerRadioIDarray[0]).checked = true;
      }
      else {
        document.getElementById(formsFilerRadioIDarray[1]).checked = true;
      }

      // Colorations of the divs

      // Laser Generation Block
      if($('#selectLaser').attr('checked')) {
        $('#laserGenerationBlock').css("background-color","#FFF8DB");
        $('#laserGenerationBlock').css("border","1px solid green");
      }
      else {
        $('#laserGenerationBlock').css("background-color","white");
        $('#laserGenerationBlock').css("border","1px solid lightgray");
      }

// Laser Generation Block
      if($('#selectEfile').attr('checked')) {
        $('#eFileBlock').css("background-color","#FFF8DB");
        $('#eFileBlock').css("border","1px solid green");
      }
      else {
        $('#eFileBlock').css("background-color","white");
        $('#eFileBlock').css("border","1px solid lightgray");
      }

      // Laser Generation Block
      if($('#selectAMSpayroll').attr('checked')) {
        $('#amsPayrollBlock').css("background-color","#FFF8DB");
        $('#amsPayrollBlock').css("border","1px solid green");
      }
      else {
        $('#amsPayrollBlock').css("background-color","white");
        $('#amsPayrollBlock').css("border","1px solid lightgray");
      }

      // Forms Filer Plus Block
      if($('#selectFormsFiler').attr('checked')) {
        $('#formsFilerBlock').css("background-color","#FFF8DB");
        $('#formsFilerBlock').css("border","1px solid green");
      }
      else {
        $('#formsFilerBlock').css("background-color","white");
        $('#formsFilerBlock').css("border","1px solid lightgray");
      }

    priceUpdate();
    });

    $('#button-cart').click(function() {
      $('#selectLaser').prop("checked", false);
      $('#laserGenerationBlock').css("background-color","white");
      $('#laserGenerationBlock').css("border","1px solid lightgray");

      $('#selectEfile').prop("checked", false);
      $('#eFileBlock').css("background-color","white");
      $('#eFileBlock').css("border","1px solid lightgray");

      $('#selectAMSpayroll').prop("checked", false);
      $('#amsPayrollBlock').css("background-color","white");
      $('#amsPayrollBlock').css("border","1px solid lightgray");

      $('#selectFormsFiler').prop("checked", false);
      $('#formsFilerBlock').css("background-color","white");
      $('#formsFilerBlock').css("border","1px solid lightgray");
    });

  });

/*
<div id='controlBoard'>
  <input type='checkbox' name='selectEfile'      id='selectEfile'      value='1'  /> : Efile Direct<br />
  <input type='checkbox' name='selectAMSpayroll' id='selectAMSpayroll' value='1'  /> : AMS Payroll<br />
  <input type='checkbox' name='selectLaser'      id='selectLaser' value='1'  /> : Laser Generation<br />
  <input type='checkbox' name='selectFormsFiler' id='selectFormsFiler' value='1'  /> : Forms Filer Plus<br />
</div>
<br />
*/




// Calculate the price of the purchase and modify the #priceBlock information. This is for display only.
function priceUpdate() {

  var eFileRadioIDarray = new Array();
  var payrollLaserRadioIDarray = new Array();
  var formsFilerRadioIDarray = new Array();

  var eFileDirectContainerID  = document.getElementsByClassName("option")[0].id;
  var payrollLaserContainerID = document.getElementsByClassName("option")[1].id;
  var formsFilerContainerID   = document.getElementsByClassName("option")[2].id;

  $("#" + eFileDirectContainerID + " input:radio").each(function (index) {
    eFileRadioIDarray[index] = $(this)[0].id;
  });

  $("#" + payrollLaserContainerID + " input:radio").each(function (index) {
    payrollLaserRadioIDarray[index] = $(this)[0].id;
  });

  $("#" + formsFilerContainerID + " input:radio").each(function (index) {
    formsFilerRadioIDarray[index] = $(this)[0].id;
  });

  // We will need to extract the price information from each radio button label. It is currently formatted as (+$XXX.XX)

//  var price = 75.00;

  var price0 = $('#baseprice').val();
  var price = Number(price0.replace(/[^0-9\.]+/g,""));

  var regExp = /\$([^)]+)\)/;

  // E-File - Upgrade E-File + 0 / 0 / 105
  var eFileUpgradePrice0 = $("label[for=" + eFileRadioIDarray[0]).text();
  eFileUpgradePrice0 = regExp.exec(eFileUpgradePrice0);

  if($("#" + eFileRadioIDarray[0]).is(":checked")) {
    price = parseFloat(price) + parseFloat(eFileUpgradePrice0[1]);
  }

  $('#eFileBlock .priceTag').html('+ ' + parseFloat(eFileUpgradePrice0[1]));

  // Payroll and Laser 0 / 0 / 0 / 0 / 75 / 105 / 180 / 75 / 105
  var payrollLaser0 = $("label[for=" + payrollLaserRadioIDarray[0]).text();
  payrollLaser0 = regExp.exec(payrollLaser0);

  if($("#" + payrollLaserRadioIDarray[0]).is(":checked")) {
    price = parseFloat(price) + parseFloat(payrollLaser0[1]);
  }

  var payrollLaser1 = $("label[for=" + payrollLaserRadioIDarray[1]).text();
  payrollLaser1 = regExp.exec(payrollLaser1);

  if($("#" + payrollLaserRadioIDarray[1]).is(":checked")) {
    price = parseFloat(price) + parseFloat(payrollLaser1[1]);
  }

  var payrollLaser2 = $("label[for=" + payrollLaserRadioIDarray[2]).text();
  payrollLaser2 = regExp.exec(payrollLaser2);

  if($("#" + payrollLaserRadioIDarray[2]).is(":checked")) {
    price = parseFloat(price) + parseFloat(payrollLaser2[1]);
  }

//  var payrollLaser3 = $("label[for=" + payrollLaserRadioIDarray[3]).text();
//  payrollLaser3 = regExp.exec(payrollLaser3);

//  if($("#" + payrollLaserRadioIDarray[3]).is(":checked")) {
//    price = parseFloat(price) + parseFloat(payrollLaser3[1]);
//  }

  $('#laserGenerationBlock .priceTag').html('+ ' + parseFloat(payrollLaser1[1]));
  $('#amsPayrollBlock .priceTag').html('+ ' + parseFloat(payrollLaser0[1]));
  // Forms Filer 0 / 0 / 45

  var formsFiler0 = $("label[for=" + formsFilerRadioIDarray[0]).text();
  formsFiler0 = regExp.exec(formsFiler0);

  if($("#" + formsFilerRadioIDarray[0]).is(":checked")) {
    price = parseFloat(price) + parseFloat(formsFiler0[1]);
  }

  $('#formsFilerBlock .priceTag').html('+ ' + parseFloat(formsFiler0[1]));

  price = parseFloat(price);
  $("#priceBlock").html("Price: $" + price.toFixed(2));
}


</script>



</div>
<div id="footer">
  <div class="column">
    <h3>Address</h3>
    <p>Advanced Micro Solutions, Inc<br />1709 South State Street<br />Edmond, OK 73013-3633</p>
    <h3>Email</h3>
    <p><a href='mailto: info@1099-etc.com?subject=Message From Website'>info@1099-etc.com</a></p>
  </div>
  <div class="column">
    <h3>Phone</h3>
    <p>Sales and Non-Technical Information<br /><b>(800) 536-1099</b></p>
    <p>Customer and Technical Support<br /><b>(405) 340-0697</b></p>
  </div>
  <div class="column">
    <h3>Fax</h3>
    <p>Orders and Registration<br /><b>(800) 519-1174</b></p>
    <p>Software Technical Support<br /><b>(405) 578-1780</b></p>
  </div>
  <div class="column">
    <h3>My Account</h3>
    <p>
      <a href="http://advancedmicrosolutions.net/index.php?route=account/account">My Account</a><br />
      <a href="http://advancedmicrosolutions.net/index.php?route=account/order">Order History</a><br />
      <a href="http://advancedmicrosolutions.net/index.php?route=account/newsletter">Newsletter</a><br />
    </p>
  </div>
  <div id='footer-copyright'>
    All Contents Copyright &copy; 2000 - Current Advanced Micro Solutions, Inc
  </div>
</div>

</body></html>

1 个答案:

答案 0 :(得分:1)

尝试更改:

var eFileUpgradePrice0 = $("label[for=" + eFileRadioIDarray[0]).text();

为:

var eFileUpgradePrice0 = $("label[for=" + eFileRadioIDarray[0] + "]").text();