Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get number value of an output to another script java

Two different scripts cannot use the same variable unless one script invoke the other script.
To use value of var a in script 1 (which has an output in html), use function parseFloat.
<script>
	a = 1.5 + 2
  	$("#a").text(a)
</script>
<script>
	b = parseFloat(a) + 2
  	$("#b").text(b)
</script>
 
PREVIOUS NEXT
Tagged: #number #output #script #java
ADD COMMENT
Topic
Name
9+6 =