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