这是我的代码它在所有浏览器中都很完美,但在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的问题.将URL转换为锚标记
文本框接受网址(例如"www.youtube.com")
我做了一个Javascript函数,将"http://"添加到链接中.
我如何制作它,以便转换按钮在网页上添加一个链接,将您带到另一个选项卡中的网站.
我的Javascript代码如下:
var webpage="";
var url="";
var message="";
var x= 0;
var page="";
function convert()
{
url=document.getElementById("link").value;
webpage = "http://" + url;
}
Run Code Online (Sandbox Code Playgroud) <span class="classname">
<img src="" width="70" height="70">
</span>
Run Code Online (Sandbox Code Playgroud)
我正在尝试添加一个锚标记,并在标记周围添加 URL。我不知道该怎么做,我已经被难住了好几个小时了..