Home Cooker Classes Others Rice CookerGX
Classes  >  document  >  PushJS(string)
document class : PushJS(string) method

Description

Add the script element that has the specified javascript code.

Syntax

documentInstance.PushJS(string jsCode)

Arguments

ClassNameDescription
stringjsCodejavascript code.

Return value

ClassDescription
elementThe script element that was added.

Sample code

document d = new document();

string jsCode = "function testJS() { alert('hellow world!');}";

element scriptElement =d.PushJS(jsCode);

Notes

Additional position is the last of the head element.

Links for reference

None

Copyright © Rice All rights reserved.