I have a list of documents that start like this...
MR 100 12.12.10
MR 100 11.12.10
MR 201 03.06.08
MR 458 04.06.09
How do I get the document names to only show MR 100 and disregard everything after the second s开发者_运维百科pace using jquery?
You can format the name using split()
slice()
and join()
:
var s = "MR 100 12.12.10".split(" ").slice(0,2).join(" ");
How you can select each document title depends on how you have your page setup.
精彩评论