这是我的代码 它在所有浏览器中工作都很完美但不是在Firefox中。.innerText为什么在Firefox中不起作用?
我尝试了很多东西,但根本没有工作。 请有人能帮我解决这个问题。 我做错了什么?
还有别的办法吗?
我正在使用.innerText因为价值从
<span class="jr-rating-wrapper-jr_stars-new-0">
4.5
</span>
未来有在控制台上没有错误。
<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>
你得到了什么错误? – pj013
您是否在控制台中发现任何错误? – Andy
此外,该代码的哪一部分不起作用。你有没有在其中加入断点来查看断点前的点? – Andy