Reputation: 75
I have a html input button which calling this function
<button class="Go" onClick="go();" disabled><div class="inner first">Nah...Not Yet</div></button>
But this script I created in another javascript which code like this name "test.js"
function go()
{
window.location.href = 'https://google.com';
}
How should I input the scriptype for the input button in order to call this function?
Upvotes: 1
Views: 39
Reputation: 81
You should add a tag in your html, and all will be fine
<script type="text/javascript" src="test.js">
Upvotes: 1