OZONE Asylum
Forums
Stupid Basic HTML
Ok...onClick and <button> problems
This page's ID:
23122
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
First of all, you have to add a type attribute, otherwise the button will default to acting like a submit button. [code] <button type="button">... [/code] Secondly, you can add an onclick event like this [code] <script type="text/javascript"> function closeWindow() { ... } </script> ... etc ... <button type="button" onclick="closeWindow()">Close Window</button> [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »