if (window.location.pathname = "/SWGT/index.com"){
$("body").removeClass("normalpage") ;
}
4 Replies - 1196 Views - Last Post: 26 July 2012 - 03:54 AM
#1
how to find the page which is rendered from the url by javascript
Posted 25 July 2012 - 08:15 AM
I am developing a website in asp.net in which i need to remove class to the body tag if the page is index.aspx page. I want to do it by javascript. I am getting the current pathName and applying the following code bt after that it shows 404 page not found error:
Replies To: how to find the page which is rendered from the url by javascript
#2
Re: how to find the page which is rendered from the url by javascript
Posted 25 July 2012 - 02:14 PM
Java != Javascript. Moved to Javascript.
#3
Re: how to find the page which is rendered from the url by javascript
Posted 25 July 2012 - 05:36 PM
You use == to compare, not =. = ASSIGNS the right side to the variable on the left.
#4
Re: how to find the page which is rendered from the url by javascript
Posted 26 July 2012 - 03:32 AM
hello,
in javascript == isn't used for comparion, it uses = for comparison.
in javascript == isn't used for comparion, it uses = for comparison.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote







|