![]() |
Calling a function in a table
<HTML>
<HEAD> <SCRIPT LANGUAGE="JAVASCRIPT"> function table() { document.write("example") } </SCRIPT> </HEAD> <BODY> <TABLE BORDER=3> <TR><TD> "HERE" </TD></TR> </TABLE> <FORM> <INPUT TYPE="BUTTON" VALUE="FUNCTION IN TABLE" onClick="table()"> </BODY> </HTML> How would i call the function to work in the table instead of starting a new page? Like when i click on the button, i want it to write "example" in the table. Can anyone help me? |
Give the <td> tags an ID:
<td id="test"> </td> And use the innerHTML property: :
function table() { |
thanks man :)
|
| All times are GMT -5. The time now is 4:22 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC