Home Notices Documents Classes Download Others Rice
Classes  >  jsexecutor  >  SetSRC(string,string)
jsexecutor class : SetSRC(string,string) method

Description

It creates a script tag to current page, and sets the src attribute in order to load JavaScript code.

Syntax

jsexecutorInstance.SetSRC(string url, string id)

Arguments

ClassNameDescription
stringurlAn url of JavaScript code to be loaded.
stringidA value of id attribute.

Return value

None.

Sample code

1:

jsexecutor jse = new jsexecutor();

2:

string url = "http://somewhere...";

3:

string id = "js"; // An identifier for the script tag to be created.

4:

jse.SetSRC(url, id);

Notes

This method creates new script tag with id attribute, and sets the src attribute.

The charset attribute is utf-8.

Note for Ver 1.0.0.1

The order of the arguments has been changed.

Links for reference

None.

Copyright © Rice All rights reserved.