imp*_*imp 1 string variables jquery
所以我有一个像这样的跨度:
<span>1</span>
Run Code Online (Sandbox Code Playgroud)
现在我想做这样的事情(加上它)
$(this).next("span").text($(this).next("span").text + 1);
Run Code Online (Sandbox Code Playgroud)
但它不会起作用.你看到我要走的路,对吧?我想让字符串或变量中的数字更高一些.
我怎样才能做到这一点?
$('span').html( parseInt( $('span').html(),10 ) + 1 );
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1213 次 |
| 最近记录: |