Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/390.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript HTML单元格按钮_Javascript_Html_Html Table_Href - Fatal编程技术网

Javascript HTML单元格按钮

Javascript HTML单元格按钮,javascript,html,html-table,href,Javascript,Html,Html Table,Href,我有一个问题,我不能让我的手机看起来像一个按钮。我使用一个表格作为导航栏,我希望单元格是一个按钮 对于HTML部分: <table cellspacing="0" class="maintablewrapper_table01"> <tr class="maintablewrapper_tr01"> <th class="maintablewrapper_tr01_th01" colspan="6">Si

我有一个问题,我不能让我的手机看起来像一个按钮。我使用一个表格作为导航栏,我希望单元格是一个按钮

对于HTML部分:

<table cellspacing="0" class="maintablewrapper_table01">
            <tr class="maintablewrapper_tr01">
                <th class="maintablewrapper_tr01_th01" colspan="6">Site Header<br><br>Head</th>
            </tr>
            <tr class="maintablewrapper_tr02">
                <td class="tdlink" onclick="window.location('http://www.google.com');">Home</td>
                <td>Producten</td>
                <td>Diensten</td>
                <td>Over ons</td>
                <td>Informatie</td>
                <td>Contact</td>
            </tr>
        </table>

非常感谢您的帮助

因为您没有将CSS放在这里,或者您不希望看到它,所以我假设它是最简单的

在最粗略的层面上,它模拟了您可能想要做的事情

CSS:


这是

我用一张桌子作为导航栏请不要。导航栏在语义上是用于导航的链接列表。HTML包含用于导航、列表和链接的元素。您希望它看起来像一个按钮。你需要一些CSS。那在哪里?不过我同意昆汀的观点,不要使用导航。好的,谢谢,这更像是一个实验。
td {
    background:#bada55;
    color:#fff;
    border:10px solid #fff;
    padding:4px 10px;
}