View Full Version : label the return value--javascript
peh1696
10-05-2004, 08:56 PM
Hi all, i wish to ask how to put the return value from the javascript function in html <Lable> ?
TQ
Max
putts
10-05-2004, 09:49 PM
<html>
<head>
<script language="JavaScript">
function setLabel()
{
document.getElementById('setMe').innerHTML = 'set it to this';
}
</script>
</head>
<body>
<p id="setMe"></p>
<a href="javascript: setLabel();">Set the label</a>
</body>
</html>
That shows you how to set the label. You should be able to use that technique with whatever Javascript you have in place.
Javascript is client-side scripting, so I'm going to put this into that forum.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.