开发者

How to split a string in combo block quota EX: [ text ] in jQuery

i'm a newbie in jQuery and i don't know how to do my homework, pls help me !

i have a String EX: this is my text, 开发者_运维问答press here.

Now i put in o block character : [here]

how can a take slipt string and get text in [ ] into variable 'done'?

thankyou !


my HTML here:

<div id="quotacontain">
   <p>this is demo [ string ]</p>
</div>

Jquery:

var temp = $("#quotacontain p").text();
var done = '';

now i want get text in syntax [ ] and get into variable 'done'. But i don't know how to do it :(


Some documentation that might help:

  • Regular Expressions
  • String.split()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜