Run Javascript

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 6: Line 6:
  
  
== Example ==
+
== Example 1 ==
  
 
<pre>
 
<pre>
 
run javascript("document.write(\"Hello Dolly!\");")
 
run javascript("document.write(\"Hello Dolly!\");")
 +
 
</pre>
 
</pre>
 +
 +
  
 
Running the script will run the javascript code. In this example, the code simply places "Hello Dolly" into the main browser.
 
Running the script will run the javascript code. In this example, the code simply places "Hello Dolly" into the main browser.
  
[[File:runjavascript.png]]
+
 
 +
 
 +
[[File:runjavascript.jpg]]
 +
 
 +
 
 +
 
 +
== Example 2 ==
 +
 
 +
This example will use javascript to calculate the quotient of two values set to variables.
 +
 
 +
The result is then displayed in the browser.
 +
 
 +
<pre>
 +
set(#one, 45562849, "Global")
 +
set(#two, 50, "Global")
 +
run javascript("document.write({#one} *{#two} )")
 +
</pre>
 +
 
 +
[[File:javascript.jpg]]

Latest revision as of 11:58, 17 February 2014

This command runs javascript code.

Run Javascript is a Browser Command.

Javascript: Where the desired Javascript is pasted for the purpose of running within the main browser.


[edit] Example 1

run javascript("document.write(\"Hello Dolly!\");")


Running the script will run the javascript code. In this example, the code simply places "Hello Dolly" into the main browser.


Runjavascript.jpg


[edit] Example 2

This example will use javascript to calculate the quotient of two values set to variables.

The result is then displayed in the browser.

set(#one, 45562849, "Global")
set(#two, 50, "Global")
run javascript("document.write({#one} *{#two} )")

Javascript.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox