This is my code so far: http://jsfiddle.net/zY3xx/
I have a blank option in all 3 dropdowns, and I want to modify the existing Javascript so that it goes to a specific URL if all 3 dropdowns have the blank option selected. The Variable is literally left empty, so it should be something along the lines of:
if开发者_Go百科 newURL = "" then goto "http://mycustomurl.com"
I'm just not sure how to implement that option in Javascript.
Does anyone know how?
Try this:
if (newUrl.length === 0) {
newUrl = 'http://google.com';
}
精彩评论