bootstrap3 超链接_bootstrap table 超链接的添加 <a>标签

package cn.cmodes.project.module.informations.controller;

import cn.cmodes.framework.aspectj.lang.annotation.Log;

import cn.cmodes.framework.aspectj.lang.enums.BusinessType;

import cn.cmodes.framework.web.controller.BaseController;

import cn.cmodes.framework.web.domain.AjaxResult;

import cn.cmodes.framework.web.page.Page;

import cn.cmodes.project.module.informations.domain.Informations;

import cn.cmodes.project.module.informations.service.IInformationsService;

import org.apache.shiro.authz.annotation.RequiresPermissions;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;

import org.springframework.ui.ModelMap;

import org.springframework.web.bind.annotation.*;

import java.util.List;/**

* 拓片/石刻 信息操作处理

*

* @author dqj

* @date 2019-03-19*/@Controller

@RequestMapping("/module/informations")public classInformationsController extends BaseController

{

@AutowiredprivateIInformationsService informationsService;

@RequiresPermissions("module:informations:view")

@GetMapping()publicString informations(String resourceId,String type,ModelMap map)

{

map.addAttribute("resourceId",resourceId);

map.addAttribute("type",type);return "module/informations/informations";

}/**

* 查询拓片/石刻列表*/@RequiresPermissions("module:informations:list")

@PostMapping("/list")

@ResponseBodypublicPage list(Informations informations)

{

startPage();

List list =informationsService.selectInformationsList(informations);returngetDataTable(list);

}/**

* 新增拓片/石刻*/@GetMapping("/add")publicString add(String resourceId,String type,ModelMap map)

{

map.addAttribute("resourceId",resourceId);

map.addAttribute("type",type);return "module/informations/add";

}/**

* 新增保存拓片/石刻*/@RequiresPermissions("module:informations:add")

@Log(title= "拓片/石刻", businessType =BusinessType.INSERT)

@PostMapping("/add")

@ResponseBodypublicAjaxResult addSave(Informations informations)

{returntoAjax(informationsService.insertInformations(informations));

}/**

* 修改拓片/石刻*/@GetMapping("/edit/{id}")public String edit(@PathVariable("id") String id, ModelMap mmap)

{

Informations informations=informationsService.selectInformationsById(id);

mmap.put("informations", informations);return "module/informations/edit";

}/**

* 修改保存拓片/石刻*/@RequiresPermissions("module:informations:edit")

@Log(title= "拓片/石刻", businessType =BusinessType.UPDATE)

@PostMapping("/edit")

@ResponseBodypublicAjaxResult editSave(Informations informations)

{returntoAjax(informationsService.updateInformations(informations));

}/**

* 删除拓片/石刻*/@RequiresPermissions("module:informations:remove")

@Log(title= "拓片/石刻", businessType =BusinessType.DELETE)

@PostMapping("/remove")

@ResponseBodypublicAjaxResult remove(String ids)

{returntoAjax(informationsService.deleteInformationsByIds(ids));

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<!DOCTYPE html> <html> <head> <title>表格形式</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> table, th, td { border: 1px solid black; border-collapse: collapse; padding: 5px; } </style> <script> // 添加一行 function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); for(var i = 0; i < 5; i++){ var cell = row.insertCell(i); cell.innerHTML = '<select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select>'; cell.onclick = function(){ this.firstChild.style.display = 'block'; } cell.firstChild.onblur = function(){ this.style.display = 'none'; } cell.firstChild.style.display = 'none'; } } </script> </head> <body> <table id="myTable"> <thead> <tr> <th>列1</th> <th>列2</th> <th>列3</th> <th>列4</th> <th>列5</th> </tr> </thead> <tbody> <tr> <td><select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select></td> <td><select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select></td> <td><select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select></td> <td><select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select></td> <td><select><option value="1">选项1</option><option value="2">选项2</option><option value="3">选项3</option></select></td> </tr> </tbody> </table> <button onclick="addRow('myTable')">增加</button> </body> </html>将这段代码用bootstrap进行优化
最新发布
04-23

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值