Zaloguj | Zarejestruj | FAQ
Anonymous

Lesson 17

+ Odpowiedz

Posty: 5 Strona 1 z 1


Lesson 17

przez Egemen » Cz lip 02, 2015 5:29 pm

hi,
i didn't understand how to use "js" file as source.
i opened new nptepad file, write an article and save file as myscript.js and open new notepad file and save as page17.htm and write

<script src="myscript.js"/>

this code. but nothing hapens. if i want re-use a script what should i do?

am i understand it wrong?

ty.
Avatar użytkownika

Egemen

  • Posty: 2
  • Dołączył(a): Pn cze 29, 2015 8:13 pm

Re: Lesson 17

przez situnrocks » Cz lip 02, 2015 8:58 pm

I think this way :

<script type='text/javascript' src='PATH-TO-SCRIPT'></script>
Avatar użytkownika

situnrocks

  • Posty: 4
  • Dołączył(a): Cz lip 02, 2015 8:42 pm
  • Lokalizacja: Cuttack,India
--
Stay updated with Wallet offers for Recharge / Shop.

Re: Lesson 17

przez Egemen » Pt lip 03, 2015 12:57 pm

nope. i couldn't do that. i think i do smt wrong... ty for your help.
Avatar użytkownika

Egemen

  • Posty: 2
  • Dołączył(a): Pn cze 29, 2015 8:13 pm

Re: Lesson 17

przez James.stier38 » So lis 19, 2016 7:17 am

Use this

<script type='text/javascript' language='javascript' src='Path to your external js file'/>

and after loading the same you may use the external file before calling.

document.getElementById('users').addEventListener('change', showUser, false);

Get the Complete informationPaytm Coupons
Avatar użytkownika

James.stier38

  • Posty: 2
  • Dołączył(a): So lis 19, 2016 7:06 am

Re: Lesson 17

przez Farhin Qureshi » Cz sty 12, 2017 11:56 am

I think you need to check the path of the Javascript file.It should be in the same folder where your html file resides.
Avatar użytkownika

Farhin Qureshi

  • Posty: 45
  • Dołączył(a): Wt sty 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com


+ Odpowiedz

Strona 1 z 1