Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 microsoft 之类的词拆分为 mic ros oft。
您还可以在 javascript 中将单词拆分为每个字母。希望这会帮助你。
var txt="microsoft"; txtArray=txt.split(''); txtLength=txtArray.length; var text=""; for(var i=1;i<=txtLength;i++) { text+=txtArray[i-1]; if(i%3==0) text+=" "; } alert(text);