Page 1 of 1

Browser Widget JavaScript pass parameters

Posted: Mon Mar 19, 2018 10:49 am
by AndyP
If you have the JavaScript in a browser widget "Browser1" for example,

1. how would you pass the parameters/variables a and b to the script
2. how would you get the value x back from the script

<!DOCTYPE html>

<p>A typical arithmetic operation takes two numbers (or variables) and produces a new number.</p>

<p id="demo"></p>

var a = 100;
var b = 50;
var x = a + b;
document.getElementById("demo").innerHTML = x;