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
Class | Name | Description |
string | url | Url to JavaScript code. |
string | id | id attribute. |
string | charSet | Encoding 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.