Sign in to follow this  
Followers 0
Shakoladka

Выпадающие меню [PHP + HTML]

2 posts in this topic

Что то я не так делаю, хочу сделать что бы после обновления страницы пункт выбирался самый первый к примеру, но что то не так я делаю не могу понять что именно! Меню рабочее, после обновления страницы вот такое: OFLXKvEhCx0.jpg.076ba8077cfd14bd8393b2eae411b587.jpgДолжно быть естественно так: 61f19f188c2b3_-1.jpg.84599aa6f0022aab2f7e092f7df11d54.jpg

С меня +сик)) пасиба

 

<div class="form-group">

                                <div class="select select select--with-icon" id="selectServer" data-value="1">
                                    <div class="select__control">
                                        <div class="select__icon"><i class="icon icon-server"></i></div>
                                        <div class="select__value"></div>
                                        <div class="select__caret"><i class="icon icon-chevron-down"></i></div>
                                    </div>
                                    <div class="select__menu">
                                        <?

                                        for($x = 1$x-1 < $servermon$x++)
                                        {
                                            switch ($x)
                                            {
                                                case 1$now = $nameserver1;break;
                                                case 2$now = $nameserver2;break;
                                                case 3$now = $nameserver3;break;
                                                case 4$now = $nameserver4;break;
                                                case 5$now = $nameserver5;break;
                                                case 6$now = $nameserver6;break;
                                                case 7$now = $nameserver7;break;
                                                case 8$now = $nameserver8;break;
                                                case 9$now = $nameserver9;break;
                                            }
                                            echo '<div class="select__item" value='.$x.'>'.$servername.' RolePlay '.$now.'</div>';
                                        }
                                        ?>
                                    </div>
                                </div>
                                <p class="help-block help-block-error">
                            </div>

 

Share this post


Link to post
Share on other sites

Up

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.