a href Attribute - Link to a JavaScript: - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:a

Description

a href Attribute - Link to a JavaScript:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<a href="javascript:console.log('Hello World!');">Execute JavaScript</a>

</body><!--from w  ww . ja  v  a 2 s  .  com-->
</html>

Related Tutorials