Reputation: 3021
I have a HTML tag like this available in jquery variable
var v = "<input type='checkbox' name='select' id='' value=1>"
As per my requirement i need to get the Value from this HTML Tag i.e 1
and store it into another Jquery Variable.
Upvotes: 2
Views: 41
Reputation: 53958
You could try something as simple as
var val = $(v).val();
var v = "<input type='checkbox' name='select' id='' value=1>";
document.write($(v).val());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Upvotes: 3