Login | Register | FAQ
Anonymous

Lesson 17

+ Post a reply

5 posts Page 1 of 1


Lesson 17

by Egemen » Thu Jul 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.
User avatar

Egemen

  • Posts: 2
  • Joined: Mon Jun 29, 2015 8:13 pm

Re: Lesson 17

by situnrocks » Thu Jul 02, 2015 8:58 pm

I think this way :

<script type='text/javascript' src='PATH-TO-SCRIPT'></script>
User avatar

situnrocks

  • Posts: 4
  • Joined: Thu Jul 02, 2015 8:42 pm
  • Location: Cuttack,India
--
Stay updated with Wallet offers for Recharge / Shop.

Re: Lesson 17

by Egemen » Fri Jul 03, 2015 12:57 pm

nope. i couldn't do that. i think i do smt wrong... ty for your help.
User avatar

Egemen

  • Posts: 2
  • Joined: Mon Jun 29, 2015 8:13 pm

Re: Lesson 17

by James.stier38 » Sat Nov 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
User avatar

James.stier38

  • Posts: 2
  • Joined: Sat Nov 19, 2016 7:06 am

Re: Lesson 17

by Farhin Qureshi » Thu Jan 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.
User avatar

Farhin Qureshi

  • Posts: 43
  • Joined: Tue Jan 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com


+ Post a reply

Page 1 of 1