English 中文(简体)
Jquery problem with IE 8
原标题:Jquery problem with IE 8
  • 时间:2010-08-10 11:00:55
  •  标签:
  • jquery

Hello i有一部完美的法典,但在第8号国际电子表格中,它确实有工作,没有给我留下任何错误!

   $(".shp_div").change(function () {
      var str = "";
      $("select option:selected").each(function () {
           var countprod =parseInt($("#countprod").val());
            var str2 = $(this).val();
            str2_array = str2.split( | );
            var cost = parseInt(str2_array[0]);
            var cost_extra = parseInt(str2_array[1]);
            if ($("#countprod").val()>1) {
            str = parseInt(((countprod-1)*cost_extra) + cost);
            } else{
            str = cost;
          }});
      $(".csq_item2").text(str);
       var total =parseInt($("#subtotal").val());
      var shipping=parseInt(str + total);
      $(".price_total").text(shipping);
    })
    .change();
问题回答

由于我没有全貌,我猜测你没有获得选定方案的价值,因此,这里是法典。 其评论是“利用这种方式”:

$(".shp_div").change(function () {
      var str = "";
      $("select option:selected").each(function () {
           var countprod =parseInt($("#countprod").val());
            // var str2 = $(this).val();
            var str2 = $(this).attr("value");  // Try using this!
            str2_array = str2.split( | );
            var cost = parseInt(str2_array[0]);
            var cost_extra = parseInt(str2_array[1]);
            if ($("#countprod").val()>1) {
            str = parseInt(((countprod-1)*cost_extra) + cost);
            } else{
            str = cost;
          }});
      $(".csq_item2").text(str);
       var total =parseInt($("#subtotal").val());
      var shipping=parseInt(str + total);
      $(".price_total").text(shipping);
    })
    .change();

Also be aware that you need to disable quirksmode for pseudo elements to work. use DOCTYPE STRICT. For instance, if you are using php you could do something like this with an included header file: <?php

www.un.org/Depts/DGACM/index_french.htm

return (str_replace("<!doctype html>>;! http://www.w3.org/TR/html4/strict.dtd”>

ob_start(“ 回顾”);

include(包括/header.php>;

ob_end_flush();

?>

The important thing to note though, is you need to be using DOCTYPE strict! hope it helps!

您可以敦促F12打开IE开发商的独角,然后管理IE8 Java debugger ,然后你可以步行,看正在发生什么。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签