<html> <head> <script type="text/javascript"> function FormatXMLTime(aTime) { // Extract the date // var date = aTime.substring(0, aTime.indexOf("T", 0)); // Remove the date. // var temp = aTime.replace(date, ""); var temptime = temp.replace("T", ""); // Extract the time. // var time = temptime.substring(0, temptime.indexOf("-", 0)); return time; // return date + " " + time; } </script> </head> <body> <form> <input type="button" onclick="FormatXMLTime('2007-12-04T09:26:59.953+00:00')" value="Call function"> </form> </body> </html> I have this code in my html file and I need the return value to be display in a textbox; is it possible?
like this: <input type="button" onclick="alert(FormatXMLTime('2007-12-04T09:26:59.953+00:00'))" value="Call function"> Code (markup): ?