Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Object From Javascript

Recommended Posts

I've done a bit of searching in google, but not turned up anything.I'm not even sure if this is possible, but, lets say i have a page, and on that page is just a table, with an id of 'andy'. I want to be able to delete that object out of the DOM??Code:<table id = "andy"> <tr> <td> dddddd </td> </tr></table><button onclick ="document.getElementById('andy').delete()">del</button><br><br><button onclick ="alert(document.getElementById('andy'))">alert</button>I'd rather not hide it, i'd like to delete. I cannot refresh the page either!Not sure if you can delete it. If you can delete, what happens does it stay on the screen ?Like i said i'm not even sure if this is possible.Thanks

Share this post


Link to post
Share on other sites

Like you said, I dont think you can delete it from screen. coz.. that means you have to change the underlying html code or html source.The source can change only on refreshing the page. So whatever you can do, you can hide it using javascript or refresh the page so that the souce does not contain the object in the first place...Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.