Go to GoReading for breaking news, videos, and the latest top stories in world news, business, politics, health and pop culture.

How to Use PHP for External JavaScript Files

104 6
    • 1). Open the HTML page in your default text editor.

    • 2). Click to place your cursor between the "<head>" and "</head>" tags. Then press "Enter" to create a blank line.

    • 3). Type "<script type="text/javascript" src="[URL]/[filename]"></script>" on the blank line.

    • 4). Replace the "[URL]" and "[filename]" text in the previous step with the URL and name of the external PHP file. For example, if the PHP file is called "script.php" and located at "http://www.example.com/scripts/", type "<script type="text/javascript" src="http://www.example.com/scripts/script.php"></script>" on the blank line.

    • 5). Click "File" and "Save" to save the HTML page.

Source...

Leave A Reply

Your email address will not be published.