当前位置:网站首页>The substring() method in. JS can be used to intercept all characters after the specified string
The substring() method in. JS can be used to intercept all characters after the specified string
2022-06-23 20:33:00 【It workers】
substring(start,stop) Method is used to extract characters that are mediated between two specified subscripts .
notes :1)substring() The returned substrings include start The character at , But does not include stop The character at ,
2)start Is a required parameter ,stop Is an optional parameter
3) When stop and start When equal , Return to empty , If start>stop, The method will exchange these two parameters before extracting the substring
Used to intercept all characters after the specified string :
function getCaption(obj){
var index=obj.lastIndexOf("\-");
obj=obj.substring(index+1,obj.length);
// console.log(obj);
return obj;
}
var str=" Enforcement process - The examination and approval ";
getCaption(str);边栏推荐
- 科班出身,结果外包都不要
- 实现vscode写markdown文档+图片自动上传至腾讯云cos
- FPGA based electromagnetic ultrasonic pulse compression detection system paper + source file
- Can Tencent cloud disk service share data? What are the advantages of cloud disk service?
- 【Golang】快速复习指南QuickReview(一)——字符串string
- How is the picture mosaic clear? What is mosaic for?
- Tupu software digital twin intelligent water service, breaking through the development dilemma of sponge City
- 徽商期货交易软件正规吗?如何安全下载?
- [golang] quick review guide quickreview (I) -- string
- Technology sharing | wvp+zlmediakit realizes streaming playback of camera gb28181
猜你喜欢

Yaokui tower in Fengjie, Chongqing, after its completion, will be the safety tower for Sichuan river shipping with five local scholars in the company

ZABBIX monitoring - Aruba AP operation data

Crise de 35 ans? Le volume intérieur est devenu synonyme de programmeur...

The golden nine silver ten, depends on this detail, the offer obtains the soft hand!

增加双因素认证,不惧密码泄露,更不惧123456

基于SSM实现微博系统

Rstudio 1.4 software installation package and installation tutorial

LeetCode 1079. movable-type printing

Kotlin jetpack compose Tab的渲染 AnimatedVisibility的使用

SQL联合查询(内联、左联、右联、全联)的语法
随机推荐
Kubernetes resource topology aware scheduling optimization
八大误区,逐个击破(终篇):云难以扩展、定制性差,还会让管理员失去控制权?
Is it safe for flush to open an account online? Is the Commission high
RStudio 1.4软件安装包和安装教程
每日刷题记录 (二)
Live sharing | Tencent cloud mongodb intelligent diagnosis and Performance Optimization Practice
20 provinces and cities announce the road map of the meta universe
UST 崩盘后,稳定币市场格局将迎来新机遇?
FPGA based electromagnetic ultrasonic pulse compression detection system paper + source file
Deep learning of handlebar handwriting (15): building your own corpus on hugging face
Real topic of the 13th National Competition of single chip microcomputer in the Blue Bridge Cup
How PostgreSQL quickly locate blocking SQL
Yaokui tower in Fengjie, Chongqing, after its completion, will be the safety tower for Sichuan river shipping with five local scholars in the company
GL Studio 5 installation and experience
SQL联合查询(内联、左联、右联、全联)的语法
[golang] use go language to operate etcd - configuration center
How to make a material identification sheet
UGeek大咖说 | 可观测之超融合存储系统的应用与设计
Kotlin jetpack compose Tab的渲染 AnimatedVisibility的使用
Activity registration | introduction to mongodb 5.0 sequential storage features