开发者

Javascript - URL based on Drop Down Selections - If all dropdowns variables are blank, then goto a specific URL

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';
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜