简体   繁体   English

我的表格包含30个字段,如何将其显示在网页上

[英]My table contains 30 fields, How can I display that on a web page

I have a mysql table called 'songs' that contains 30 fields and I have a 'song_list.php' page with the width of 800px. 我有一个名为'songs'的mysql表,其中包含30个字段,并且有一个'song_list.php'页面,宽度为800px。 I have already implemented it but its seems too crowded. 我已经实现了它,但是它似乎太拥挤了。 Is there any way to efficiently (easy to read) display the fields. 有什么方法可以有效(易于阅读)显示字段。

Record 1
    key    value
    key    value
    key    value
    key    value
    ...

Record 2
    key    value
    key    value
    key    value
    key    value
    ...

Record 3
    key    value
    key    value
    key    value
    key    value
    ...

...

仅显示重要的内容,其余显示在鼠标悬停时或在单独的弹出窗口中。

use something like to make excessively long titles links smaller & only show whats needed title, date,cat, sml desc,price ect 使用类似的方法来缩小标题链接的长度,并仅显示所需的标题,日期,猫,sml desc,价格等

function _substr($str, $length, $minword = 3){
    $sub = '';
    $len = 0;
    foreach (explode(' ', $str) as $word)
    {
        $part = (($sub != '') ? ' ' : '') . $word;
        $sub .= $part;
        $len += strlen($part);
        if (strlen($word) > $minword && strlen($sub) >= $length)
        {
            break;
        }
    }
    return $sub . (($len < strlen($str)) ? '...' : '');
}

您可以将pagination与“ view more选项一起使用

I would triage what the most useful fields are for immediate viewing. 我将对最有用的字段进行即时分类。 Those are the only fields I would display by default. 这些是我默认显示的唯一字段。 Then have a "more" button of some sort. 然后,使用某种“更多”按钮。 If clicked, I'm partial to popping up information in a modal dialog. 如果单击,则表示我不喜欢在模式对话框中弹出信息。 That way any clicks or modifications are still easy to handle via javascript. 这样,任何点击或修改仍然很容易通过javascript处理。

If you aren't comfortable rolling your own modal for a project like this, or need somewhere to start, check out this modal dialog roundup. 如果您不愿意为这样的项目滚动自己的模态,或者需要某个地方开始,请查看此模态对话框综述。 http://komunitasweb.com/2009/03/jquery-modal-box-round-up/ http://komunitasweb.com/2009/03/jquery-modal-box-round-up/

Hi with the same problem I used one jQuery plugin called custom scroller 嗨,同样的问题,我使用了一个名为自定义滚动条的 jQuery插件

Check this out 看一下这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何制作一个表格,该表格将更新我的表并在TeamStats页面上连续显示? - How Can I Make a Form That Will Update My Table and Display as a Row on My TeamStats Page? 我正在尝试将数据从MySQL显示到包含表格的PHP页面,但我无法在表格中显示信息 - I'm trying to display data from MySQL onto a PHP page that contains a table but I can't get the info to display inside the table 如何在另一个php页面(包括包含GET请求的php页面)上显示超链接的GET输出 - How can i display GET output of a hyperlink on another php page (that includes the php page that contains GET request) 如何在我的 web 应用程序中向 php 的用户显示内容? - How can I display something to a user with php in my web app? 如何仅在wordpress中显示30个单词的帖子 - How can i display post with 30 words only in wordpress 如何使用PHP在新页面中显示结果表? - how can I display the result table in a new page by using PHP? 如何在下一页显示我的风格车牌 - How can i display my styled number plate on next page 如何将 Amadeus API 与我的 Laravel 网页集成? - How can I integrate the Amadeus API with my Laravel web page? 如何加快我的 Web 页面的加载速度? - How can i speed up load up of my Web Page? 如何在我的html网页中启用数学运算 - How can I enable use of math in my html web page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM