External links
Category:Bollywood
Category:Indian films
Category:Hindi-language films
Category:2005 films
Category:Tiger attacks
Category:Films scored by Datta NaikQ:
how to get numeric values from string
I have a string which is supposed to contain
what I want is to get the "Something_else" as a numeric value, but when I do
the only thing which gets
var x = $(this).val();
is "something_else".
So how can I get the numeric value after "Something_else"?
A:
Something_else is a string (not a number). Use parseInt() or parseFloat() instead. For example:
var x = $(this).val();
var val = parseInt($(this).val());
A:
The value property of input type is a string so you have to parse it as a number.
var $el = $('');
var val = +$el.val();
console.log(val);
-
5
*
z
+
2
=
0
,
0
=
4
*
s
-
2
*
z
-
2
8
f
o
r
s
.
5
S
o
l
v
e
0
=
-
4
*
d
-
2
*
y
-
1
6
,
-
5
*
d
+
2
*
y
=
2
8
-
7 ac619d1d87
Related links:
Comentários