I have a variable var i = "my*text" I want to split it using special character *. I mean, I want to generate var one = "my&
var i = "my*text"
*
var one
Just to add, the comma operator is your friend here:
var i = "my*text".split("*"), j = i[0], k = i[1]; alert(j + ' ' + k);
http://jsfiddle.net/EKB5g/