var email = 'abc@163.com'
var sp = 'https://mail.' + email.substring(email.indexOf('@')+1,email.length)
console.log(sp)
结果:https://mail.163.com
var email = 'abc@163.com'
var sp = 'https://mail.' + email.substring(email.indexOf('@')+1,email.length)
console.log(sp)
结果:https://mail.163.com
本文标题:javascript截取@之后的字符串
本文链接:https://www.haomeiwen.com/subject/welxtftx.html
网友评论