Home > Web Front-end > JS Tutorial > body text

jquery 取字符串中数字的正则_jquery

WBOY
Release: 2016-05-16 18:23:44
Original
875 people have browsed it

核心代码:

复制代码 代码如下:

var paddleft = $(".teacher-title").css("padding-left").replace(/[^0-9]/ig, "");
var num=parseInt(paddleft);

演示代码:

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!