atar.yosef Posted October 19, 2012 Share Posted October 19, 2012 Hi there!!Modern browser allow users to specify a JavaScript code that will be executed every time the user load a web site. and my question is: is there any way to block some parts of a web site from being shown by using some JavaScript code? And if yes, so how?Thanks in advance!!Atar. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 19, 2012 Share Posted October 19, 2012 You can target elements a variety of ways, once you get the elements you want to hide then you can either remove them from the DOM completely, or use CSS to set their display or visibility properties so that they don't appear. Link to comment Share on other sites More sharing options...
atar.yosef Posted October 20, 2012 Author Share Posted October 20, 2012 Thanks on your reply, but how can I remove those elements from the DOM? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 29, 2012 Share Posted October 29, 2012 Elements have a removeChild method that will remove a child element from the DOM. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now