How can a do to execute a function when clicking a link?

Something like:


<p>Link</p>

<script>
$("p").click(function () {
$(this).myFunction();
});
</script>


<script> function myFunction(
)
</script>