Move js script to external file

后端 未结 1 1370
攒了一身酷
攒了一身酷 2021-01-05 02:55

I have the following code in a div to move the div when clicking on he move button:

    

        
1条回答
  •  -上瘾入骨i
    2021-01-05 03:22

    Steps for your solution are:

    1. Create a javascript file (a file with extension .js). Lets suppose the file is moveDiv.js
    2. Move all the javascript code into this newly created file as it is except tags.
    3. Give reference to this file in your HTML file as

    This should start moving your button again.

    0 讨论(0)
提交回复
热议问题