因为$(this)指向的是被点击的元素,而被点击的元素没有value属性,所以返回的是空值。如果想获取该元素的文本内容,可以使用text()方法。例如:console.log($(this).text())。

为何this的value是空值 $ajax type GET url httptoutiaoitheimanetv1_0channels success function res 筛选数据 const channels = resdata; consolelogchannels;

原文地址: https://www.cveoy.top/t/topic/9q1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录