Jump to content

Check URL with js


iPixel

Recommended Posts

I got it

 

function Check4Pop()
{
	var myURL = window.location.href;
	//alert(myURL);

	if((myURL == "http://www.mywebsite.com/") || (myURL == "http://www.mywebsite.com") || (myURL == "http://www.mywebsite.com/index.php"))
		{
			document.getElementById("gopopup").style.display = 'block';
		}
	else
		{
			document.getElementById("gopopup").style.display = 'none';
		}
}

Link to comment
https://forums.phpfreaks.com/topic/188014-check-url-with-js/#findComment-992611
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.