小编Low*_*vel的帖子

引导程序:即使禁用按钮,也会显示模态

危险的!

我已将bootstrap-modal放置在页面上,作为一种Apply-remove对话框,当禁用remove-button(不是模式中的一个;有两个remove-button)时,该模式可能不会出现(当尝试从数据库中删除记录时)。我了解您可以删除data-toggle我的“删除”按钮的属性(不是按钮,而是span实际上的按钮),但是没有别的选择吗?我猜是因为span保持“启用”状态?但是如何“禁用跨度”?好的,听起来“不健康”,但是我需要span使用,因为我将data-toggle按钮的属性用于tooltip

以下是我使用的脚本和样式:

<script type="text/javascript" src='/blablabla/browser/bootstrap/js/jquery.min.js'></script>
<script type="text/javascript" src='/blablabla/browser/bootstrap/js/bootstrap.min.js'></script>
<link rel="stylesheet" href="/blablabla/browser/bootstrap/css/bootstrap.min.css" type="text/css" />
Run Code Online (Sandbox Code Playgroud)

这是我的按钮:

<!-- Button trigger modal -->
<span data-toggle="modal" data-target="#applyRemoveDialog">
    <button id="btn-remove-all" type="button" class="btn btn-danger" 
        disabled="disabled" title="Remove" data-toggle="tooltip"></button>
</span>
Run Code Online (Sandbox Code Playgroud)

这是我的模态:

<div class="modal fade" id="applyRemoveDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Apply Removal</h4>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> …
Run Code Online (Sandbox Code Playgroud)

jquery modal-dialog disabled-control twitter-bootstrap bootstrap-modal

5
推荐指数
1
解决办法
8029
查看次数

如何链接到 Markdown 文件(目录)中包含点 (.) 或逗号 (,) 的标题?

在我的Readme.MD降价文件中,我想创建目录(用于 Github)。[TOC](由 Typora 生成)未显示在 Github 上。它显示为[TOC]. 我的一些标题包含点或逗号等字符。有没有办法链接到这些标题?

我尝试了几乎所有我认为的东西,例如:[app.js File](#app.js-file), [app.js File](#app-js-file), [app.js](#app--js-file), [app.js](#app\.js-file), [app.js](#appjs-file)。什么都行不通。

下面是一个例子:

Table of contents:
[app.js](#app-js)
[script.js](#script.js)
[One, two, three](#one,-two,-three)

# app.js File
Some text

# script.js File
Some text

# One, two, three
Some text
Run Code Online (Sandbox Code Playgroud)

PS 有些人在谈论创建 HTML 锚点(命名),但是你如何/在你的 MD 文件中在哪里编写它们(如果它是解决方案)。你能解释一下吗(我在互联网上找不到任何解决方案)。

markdown github hyperlink heading readme

3
推荐指数
1
解决办法
3257
查看次数

如何将 Spring 表单输入占位符属性值引用到消息源属性?

是否可以使用spring- 标签(spring表单标签库,用于数据绑定)中的标签(spring 标签库)从.properties消息文件中检索消息。spring:messageform:input


src/main/resources > texts.properties(文件)

testEntry=Test entry
Run Code Online (Sandbox Code Playgroud)

src/main/webapp/WIN-INF/JSP > test.jsp

如果我尝试这样做:

testEntry=Test entry
Run Code Online (Sandbox Code Playgroud)

我得到的结果<spring:message code="testEntry">是占位符而不是Test entry


如果我尝试这样做:

<%@taglib prefix='spring' uri='http://www.springframework.org/tags'%>
<%@taglib prefix='form' uri='http://www.springframework.org/tags/form'%>

<form:input path="test" placeholder='<spring:message code="testEntry">'/>
Run Code Online (Sandbox Code Playgroud)

我得到同样的结果。我明白这个问题。但是,是否有另一种方法可以在 JSP 中执行此操作,以便具有适当代码的消息显示为 spring-form 标记的属性值?

java spring jsp spring-form spring-messaging

1
推荐指数
1
解决办法
7261
查看次数