jsexecutor クラス : SetSRC(string,string,string)メソッド
説明
script タグを作成し、src 属性を設定します。
構文
instance.SetSRC(string url, string id, string charset)
引数
| クラス | 名前 | 説明 |
| string | url | URL。 |
| string | id | id 属性。 |
| string | charset | エンコーディング名。 |
返り値
無し。
サンプルコード
| 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); |
以下の様な script タグが body タグに追加されます。
| 1: | <script src="https://code.jquery.com/jquery-3.5.1.min.js" id="sample" charset="utf-8"> |
| 2: | </script> |
注意
無し。
参照リンク
無し。


