As gaetanoM suggested, a regular expression would be the easiest way to do it.
if (window.location.href.match(/d/)) { alert('contains a number'); } else { alert('does not contain a number'); }
1.4m articles
1.4m replys
5 comments
57.0k users