我有.amount类的span,现在我想从span中获取价格
$('.dimension-layer-dimension').click(function() {
// I am trying with this javascript
var price4 = $(this).find('radio:checked').data('price')
$('span.amount').text(price);
alert(price4);
});
<script src="https://
我有一个关于数组的基本JS问题。
我只是不能把我的大脑围绕在下面的代码上。我知道你需要下面的代码才能让程序理解它的检查,但是有人能帮我逐行地通过JS吗?
var sex = document.getElementsByName("sex");
var sex_value = "";
//here is where my confusion starts
for (var i=0; i < sex.length; i++)
{
if (sex[i].checked)
sex_value = sex[i].va