小编use*_*130的帖子

为什么.innerText无法在Firefox中运行?

这是我的代码它在所有浏览器中都很完美,但在Firefox中却没有.

我尝试过很多东西,但根本没用.请问有人可以帮我解决这个问题.难道我做错了什么.?

还有别的办法吗?

我正在使用.innerText,因为价值来自

<span class="jr-rating-wrapper-jr_stars-new-0">
 4.5
</span>
Run Code Online (Sandbox Code Playgroud)

控制台上没有错误.

<script type="text/javascript">
   jQuery('#submitButton').click(function(){
   var PostStartone = document.getElementById('jr-rating-wrapper-jr_stars-new-0').innerText;
   var PostStarSec = document.getElementById('jr-rating-wrapper-jr_stars-new-1').innerText;
   var PostStarThird = document.getElementById('jr-rating-wrapper-jr_stars-new-2').innerText;
   var PostCapVal = document.getElementById('code').value;
   var PostRBVal = "";
   var selected = jQuery("div.jr_fieldDiv input[type='radio']:checked");
   PostRBVal = selected.val();
   jQuery.post("http://xyz/x/Update.php", { 
      GetStarOneValue : PostStartone ,
      GetStarSecValue : PostStarSec ,
      GetStarThirdValue : PostStarThird ,
      GetCaptchValue : PostCapVal,
      GetRadioBTNValue : PostRBVal});
 });
</script>
Run Code Online (Sandbox Code Playgroud)

javascript firefox jquery

12
推荐指数
1
解决办法
1万
查看次数

标签 统计

firefox ×1

javascript ×1

jquery ×1