Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

javascript - 如何使用拆分?(How to use split?)

I need to break apart a string that always looks like this:

(我需要分解一个始终如下所示的字符串:)

something -- something_else.

(东西-something_else。)

I need to put "something_else" in another input field.

(我需要在另一个输入字段中输入“ something_else”。)

Currently, this string example is being added to an HTML table row on the fly like this:

(当前,此字符串示例正被即时添加到HTML表行中,如下所示:)

tRow.append($('<td>').text($('[id$=txtEntry2]').val()));

I figure "split" is the way to go, but there is very little documentation that I can find.

(我认为“拆分”是可行的方法,但是几乎找不到文档。)

  ask by Matt translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...