All,
I have the following html as a string in javascript. I need to extract the string in "value", split by the specified delimeter "|" and put in two variables.
var html = '<div><input name="radBtn" class="radClass" style="margin:auto;"
onclick="doSomething();"
value="Apples|4567" type="radio">
</div>';
Required output is two variables having the following values:
fruitName = Apples
fruitNumber = 4567
Note: There can be many radio buttons with the same name.