you can use jquery. try this code:
<html>
<head>
<title>Opens a link</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.js"></script>
</head>
<body>
<label for="link" id="target">www.google.com</label>
<script type="text/javascript">
$('#target').click(function () {
var url = $(this).text();
window.location = "http\://"+url;
});
</script>
</body>
</html>
source
share