نمایش نتایج: از شماره 1 تا 10 , از مجموع 14

موضوع: ساخت صفحه html جستجو و تب دار

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #11
    عضو انجمن data20 آواتار ها
    تاریخ عضویت
    Nov 2012
    نوشته ها
    105
    تشکر تشکر کرده 
    121
    تشکر تشکر شده 
    151
    تشکر شده در
    106 پست

    پیش فرض پاسخ : ساخت صفحه html جستجو و تب دار

    اگر id تلگرام امضاتون درست ه بهتون پیام میدم
    کد جاوارو همون جوری در فایلی که در نظر دارید قرار بدید و فقط 1 بار لازم و خودش هر چند تا جدولی که ایجاد کنید کنترل میکنه
    کد HTML:
        $(document).ready(function () {          $(document).ready(function () {      
    $(document).on("keyup",'.filter', function(e){
            var value = $(this).val().toLowerCase();
            $(this).parent().find("table tr").filter(function(){
            $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
            });    
            });
        });    });
    هم تو قایلی که پیوست کردید هم تو پست خودتون myTable هست در تگ tbody که قرمز کردمش
    نقل قول نوشته اصلی توسط AHF-victory نمایش پست ها
    کل کد
    کد:
    <div class="container">
        <h2>Dynamic Tabs</h2>
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#home">Home</a></li>
            <li><a data-toggle="tab" href="#menu1">Menu 1</a></li>
            <li><a data-toggle="tab" href="#menu2">Menu 2</a></li>
            <li><a data-toggle="tab" href="#menu3">Menu 3</a></li>
        </ul>
    
        <div class="tab-content">
            <div id="home" class="tab-pane fade in active">
    
                <div class="container">
                    <h2>Filterable Table</h2>
                    <p>Type something in the input field to search the table for first names, last names or emails:</p>
                    <input class="form-control filter" type="text" placeholder="Search..">
                    <br>
                    <table class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>Firstname</th>
                            <th>Lastname</th>
                            <th>Email</th>
                        </tr>
                        </thead>
                        <tbody id="myTable">
                        <tr>
                            <td>amir</td>
                            <td>Doe</td>
                            <td>john@example.com</td>
                        </tr>
                        <tr>
                            <td>Mary</td>
                            <td>Moe</td>
                            <td>mary@mail.com</td>
                        </tr>
                        <tr>
                            <td>July</td>
                            <td>Dooley</td>
                            <td>july@greatstuff.com</td>
                        </tr>
                        <tr>
                            <td>Anja</td>
                            <td>Ravendale</td>
                            <td>a_r@test.com</td>
                        </tr>
                        </tbody>
                    </table>
    
                    <p>Note that we start the search in tbody, to prevent filtering the table headers.</p>
                </div>
    
            </div>
            <div id="menu1" class="tab-pane fade">
                <div class="container">
                    <h2>Filterable Table</h2>
                    <p>Type something in the input field to search the table for first names, last names or emails:</p>
                    <input class="form-control filter"  type="text" placeholder="Search..">
                    <br>
                    <table class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>Firstname</th>
                            <th>Lastname</th>
                            <th>Email</th>
                        </tr>
                        </thead>
                        <tbody id="myTable">
                        <tr>
                            <td>no</td>
                            <td>Doe</td>
                            <td>john@example.com</td>
                        </tr>
                        <tr>
                            <td>Mary</td>
                            <td>Moe</td>
                            <td>mary@mail.com</td>
                        </tr>
                        <tr>
                            <td>July</td>
                            <td>Dooley</td>
                            <td>july@greatstuff.com</td>
                        </tr>
                        <tr>
                            <td>Anja</td>
                            <td>Ravendale</td>
                            <td>a_r@test.com</td>
                        </tr>
                        </tbody>
                    </table>
    
                    <p>Note that we start the search in tbody, to prevent filtering the table headers.</p>
                </div>
            </div>
            <div id="menu2" class="tab-pane fade">
                <div class="container">
                    <h2>Filterable Table</h2>
                    <p>Type something in the input field to search the table for first names, last names or emails:</p>
                    <input class="form-control filter" type="text" placeholder="Search..">
                    <br>
                    <table class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>Firstname</th>
                            <th>Lastname</th>
                            <th>Email</th>
                        </tr>
                        </thead>
                        <tbody id="myTable">
                        <tr>
                            <td>John</td>
                            <td>Doe</td>
                            <td>john@example.com</td>
                        </tr>
                        <tr>
                            <td>Mary</td>
                            <td>Moe</td>
                            <td>mary@mail.com</td>
                        </tr>
                        <tr>
                            <td>July</td>
                            <td>Dooley</td>
                            <td>july@greatstuff.com</td>
                        </tr>
                        <tr>
                            <td>Anja</td>
                            <td>Ravendale</td>
                            <td>a_r@test.com</td>
                        </tr>
                        </tbody>
                    </table>
    
                    <p>Note that we start the search in tbody, to prevent filtering the table headers.</p>
                </div>
            </div>
            <div id="menu3" class="tab-pane fade">
                <div class="container">
                    <h2>Filterable Table</h2>
                    <p>Type something in the input field to search the table for first names, last names or emails:</p>
                    <input class="form-control filter" type="text" placeholder="Search..">
                    <br>
                    <table class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>Firstname</th>
                            <th>Lastname</th>
                            <th>Email</th>
                        </tr>
                        </thead>
                        <tbody id="myTable">
                        <tr>
                            <td>John</td>
                            <td>Doe</td>
                            <td>john@example.com</td>
                        </tr>
                        <tr>
                            <td>Mary</td>
                            <td>Moe</td>
                            <td>mary@mail.com</td>
                        </tr>
                        <tr>
                            <td>July</td>
                            <td>Dooley</td>
                            <td>july@greatstuff.com</td>
                        </tr>
                        <tr>
                            <td>Anja</td>
                            <td>Ravendale</td>
                            <td>a_r@test.com</td>
                        </tr>
                        </tbody>
                    </table>
    
                    <p>Note that we start the search in tbody, to prevent filtering the table headers.</p>
                </div>
            </div>
        </div>
    </div>

    ویرایش توسط data20 : September 17th, 2018 در ساعت 23:58
    If you do what you've always done, you'll always get the same result
    Life is too short to be normal ! Stay Weird

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. چگونه مطالب یک سایت خاص را در گوگل جستجو کنیم؟ (html)
    توسط سیدرضا بازیار در انجمن HTML-XHTML
    پاسخ ها: 0
    آخرين نوشته: September 24th, 2016, 23:23
  2. استخدام html-css کار حرفه ای
    توسط AhrimanSefid در انجمن به دنبال کارمند هستم
    پاسخ ها: 0
    آخرين نوشته: May 28th, 2014, 09:42
  3. پاسخ ها: 6
    آخرين نوشته: January 5th, 2013, 19:10
  4. مستر html
    توسط mizbanaval در انجمن HTML-XHTML
    پاسخ ها: 4
    آخرين نوشته: September 4th, 2012, 14:55
  5. دوره تابستان آموزش html (با اعطای مدرک)
    توسط epooli در انجمن دیگر زبان ها
    پاسخ ها: 8
    آخرين نوشته: June 27th, 2011, 00:30

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •