我有一个这样的函数...我正在尝试使用变量gotValue
插入类名。我如何在 jQuery 中传递它?我已经在 if 子句中尝试过,但没有成功。
function fullData(gotValue)
{
alert(gotValue);
var count = gotvalue.substring(9);
if($('.'+gotValue+'').is(':checked'))
{
alert('working');
}
}
最佳答案
Javascript 变量是 case-sensitive ;所以:
gotValue != gotvalue
关于javascript - jquery 中的变量转义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3370502/