"<a href='javascript:void(0)' onclick='showBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>查看</a> " + "<a href='javascript:void(0)' onclick='editorBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>编辑</a> " + "<a href='javascript:void(0)' onclick='historyBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>变更记录</a>" + "<a href='javascript:void(0)'onclick='sendCommission(" + value + "," + JSON.stringify(row) + "," + index + ")'> 发送委托</a>";a标签自动分隔开
时间: 2023-07-08 07:28:33 浏览: 115
这段代码中包含多个 HTML <a> 标签,它们之间使用加号连接起来。如果您希望将它们进行自动分隔,可以使用 CSS 样式来实现,比如在每个 <a> 标签的后面添加一个竖线分隔符,可以使用如下样式:
```
a + a:before {
content: " | ";
}
```
这样就可以在每个 <a> 标签的后面添加一个竖线分隔符了。如果您希望使用其他的分隔符,可以将上面的样式中的竖线替换为其他字符。
相关问题
"<a href='javascript:void(0)' onclick='showBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>查看</a> " + "<a href='javascript:void(0)' onclick='editorBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>编辑</a> " + "<a href='javascript:void(0)' onclick='historyBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>变更记录</a>" + "<a href='javascript:void(0)'onclick='sendCommission(" + value + "," + JSON.stringify(row) + "," + index + ")'> 发送委托</a>";
这是一个包含多个 HTML <a> 标签的字符串,每个标签都有一个 onclick 属性,用于触发相应的 JavaScript 函数。这些函数的参数包括 value、row 和 index,它们都是 JavaScript 变量。通过这些参数,函数可以获取到所需的数据,并执行相应的操作,比如查看、编辑、变更记录和发送委托等。
return "<input type='button' class='l-btn l-btn-small' onclick='showBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")' value='查看 '/> "+ "<input type='button' class='l-btn l-btn-small' onclick='editorBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")' value='编辑 '/> "+ "<input type='button' class='l-btn l-btn-small' onclick='historyBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")' value='变更记录'/>"转成a标签
可以通过如下方式将这段代码转换成 a 标签的形式:
```javascript
return "<a href='javascript:void(0)' onclick='showBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>查看</a> " +
"<a href='javascript:void(0)' onclick='editorBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>编辑</a> " +
"<a href='javascript:void(0)' onclick='historyBookEntry(" + value + "," + JSON.stringify(row) + "," + index + ")'>变更记录</a>";
```
这里使用了 `a` 标签来代替 `input` 标签,并且通过 `href='javascript:void(0)'` 来指定点击链接时执行的 JavaScript 函数。
阅读全文