网上查看了别人写的,发现多多少少有点漏洞,经过我自己总结,写出了达到了我要求的
str = $('前台获得时间time').val().slice(5) + "- " + $('前台获得时间time'' } 希望我写的东西对其他人有帮助