首页
IT
登录
6mi
u
盘
搜
搜 索
IT
jq获取一串字符串中的数字
jq获取一串字符串中的数字
xiaoxiao
2021-04-12
31
replace(/[^0-9]/ig,”“) 我的id是chart1,chart2,chart3….这样子的, 我现在只有最后的那个数字
$(
".chart"
).click(
function
()
{
alert($(
this
).attr(
'id'
).replace(
/[^0-9]/ig
,
""
)) });
转载请注明原文地址: https://ju.6miu.com/read-667943.html
技术
最新回复
(
0
)