What is the difference between the script written by the js file and the script written by the < srcipt > tag?

what"s the difference between writing JavaScript code in a js file and writing code in < srcipt > < / srcipt >?
Why can I introduce other js files as require in the js file and do report an error in the < srcipt > tag
.

Feb.27,2021

browsers don't support it yet.
< script type= "module" >
import {addTextToBody} from'. / utils.js';

< / script >
write script tags this way you can use import


is no different, these are just different ways of introduction


js does not have require,es6 support for import

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-1e89ad4-46d3d.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-1e89ad4-46d3d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?