1
我有这样的代码:Laravel标签不可见
<div class="container col-md-6 col-md-offset-3">
<div class="well well bs-component">
<table class="table">
<thead>
<tr>
<th>Logo</th>
<th>Bedrijfsnaam</th>
<th>Plaats</th>
</tr>
</thead>
<tbody>
@foreach($companies as $company)
<a href="/bedrijf/{!! $company->CompanyId !!}">
<tr>
<td><img class="img-circle-company" src="{!! $company->Logo != null ? '/files/images/companylogos/'.$company->Logo : '/files/images/companylogos/default.png'!!}"/></td>
<td>{{ $company->CompanyName }}</td>
<td>{{ $company->City }}</td>
</tr>
</a>
@endforeach
</tbody>
</table>
</div>
但标签不工作这是为什么?在我的网页源代码,它看起来是这样的:
你在包装标签,这是不合法的HTML那么您的浏览器可能会剥离了这一点,一个TR http://stackoverflow.com/questions/10245279/wrapping-html-table-rows-in -a标签 – markdwhite