Questions about the invalidity of jQuery:$.getScript

now I need to load the EasyUI component dynamically, because my page is embedded in iframe

loads correctly and the component takes effect in the following ways

var script = parent.document.createElement("script");
script.type = "text/javascript";
script.src = "easyUI/jquery.easyui.min.js";
parent.document.getElementsByTagName("head")[0].appendChild(script);

now I want to change it to the following form to load correctly, but the component does not take effect

$.getScript("easyUI/jquery.easyui.min.js", function( data, status, jqXHR ) {

});

shows $("- sharpwin"). Window is not a function) and is indeed not loaded into the component in the prototype chain

have any seniors encountered similar problems? Or where should I start?

the method is described as follows in the official API

The script is executed in the global context, so it can refer to other variables and use jQuery functions. Included scripts can have some impact on the current page.

is it because the first way is to load into the head, where the iframe is located and the second way is to load to the top-level head?

Mar.10,2021

your first way parent.document this is done on the parent page.
and the second is what is done on the current page, which is definitely different.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b357c3-34349.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b357c3-34349.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?