jsexecutor class : SetSRC(string,string,string) method

Description

Creates a script tag and sets the src attribute.

Syntax

instance.SetSRC(string url, string id, string charset)

Arguments

ClassNameDescription
stringurlUrl to JavaScript code.
stringidid attribute.
stringcharSetEncoding name.

Return value

None.

Sample code

1:

jsexecutor jse; // For Main-browser

2:

string url = "https://code.jquery.com/jquery-3.5.1.min.js";

3:

string id = "sample";

4:

string charset = "utf-8";

5:

jse.SetSRC(url, id, charset);

The following script tag is added to the body tag.

1:

<script src="https://code.jquery.com/jquery-3.5.1.min.js" id="sample" charset="utf-8">

2:

</script>

Notes

None.

Links for reference

None.

Copyright © Cooker All rights reserved.