Calling function from another javascript in html -


i have html input button calling function

<button class="go" onclick="go();" disabled><div class="inner first">nah...not yet</div></button> 

but script created in javascript code name "test.js"

function go() {     window.location.href = 'https://google.com';    } 

how should input scriptype input button in order call function?

you should add tag in html, , fine

<script type="text/javascript" src="test.js"> 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -