开发者

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

开发者 https://www.devze.com 2022-12-29 10:40 出处:网络
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.

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

精彩评论

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

关注公众号