0
js import
how to include my .js file in sololearn?
6 Antworten
+ 2
"Ulisses Cruz", how do you put my name as reference in your comment
0
<script src='http://yoursite.com/same_path/your_js_script.js'>
in head section of html
or by creating DOM element 'script' with src='http://yoursite.com/same_path/your_js_script.js'
0
梅云飞
what Dmitriy said will work if your .js file is online and you have an url to it.
But if that is not the case:
1. Copy the source code to the JS section of Playground.
. If you clicked the '+' in the code playground and chose 'Web'
you will see that the screen will have 4 tabs: (HTML, CSS, JS and OUTPUT)
put your code in the JS section.
2. Put your code inside a <script> tag in the HTML section.
Hope this helps : )
0
3ks, but i want to use some common utils in sololearn. thus, i can import it by <script> when i create new project in playground
0
梅云飞
I did not understand what you mean.
0
If you have the last Sololearn Update you can just type the @ character,
a list of names will apear. I did this I chose your name in the list.