CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <base href="https://www.tutsinsider.com/"> <title>JavaScript External Scripting Tutorial - TutsInsider</title> <style> .main{ padding: 10px; } .main-heading{ background: #333333; color: #ffffff; padding: 20px; } .main-paragraph{ margin-top: -20px; padding: 20px; box-shadow: inset 0 0 3px 0 #2a73cc; } .main-button{ padding: 5px 10px; margin: 5px; border: none; border-radius: 5px; background: #333333; color: #ffffff; box-shadow: 0 0 3px 0 #333333; cursor: pointer; } </style> </head> <body> <div class="main"> <h2 class="main-heading" id="main-heading">What is JavaScript External Scripting?</h2> <div class="main-paragraph" id="main-para"> <p>We can include JavaScript in a web page by <a href="https://www.tutsinsider.com/javascript/javascript-how-to/">three methods</a>, and external scripting is the third method.</p> <h3>Click the Button to Shuffle the letter colors</h3> <h2 id="shuffleString" style="letter-spacing: 2px; margin-bottom: 10px; margin-top: 50px;">External JavaScript</h2> <button id="shuffleButton" class="main-button">Shuffle Colors</button> </div> </div> <script src="https://www.tutsinsider.com/resources/javascript-tutorial.js"></script> </body> </html>