小编ama*_*mam的帖子

Javascript - 多个复杂的if语句

我正在努力解决javaScript中的多个复杂语句,并想知道是否有人能指出我正确的方向.

    function findFlights()
    {
    var yourDestination = readTheDestination();
    var yourAirline = readTheAirline();
    var yourFare = readTheFare();


    if (yourDestination == 'Choose your destination')
        {
        displayMessage('<B>Please choose a destination city from the Destination menu and then click Find flights again.</B>');
        }
    else
        {
        var destinationTime, destinationOperator, destinationFare;
        var message = '<B>You asked about flights to ' + yourDestination + '</B><BR>' + "";

        for (var i=0; i < flightTimes.length; i++)                      //flight destinations
        {
        if    // statement                                              // IF flight:
           ((flightDestinations[i] == yourDestination && …
Run Code Online (Sandbox Code Playgroud)

javascript

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

javascript ×1