Home >php教程 >PHP开发 >Jquery method to intercept strings in a loop (extra strings are processed into '...')

Jquery method to intercept strings in a loop (extra strings are processed into '...')

高洛峰
高洛峰Original
2016-12-05 09:17:521163browse

As shown below:

$('a[rev="title"]').each(function () {
 
  var u = $.trim($(this).html());
  $(this).html(SetSub(u, 10))
});
 
  
 
SetSub相当于substr

The above method of Jquery loop intercepting strings (the extra strings are processed into "...") is all the content shared by the editor. I hope it can give you a reference

Statement:
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