我有一个带有添加按钮的html表单,该按钮附加到文本框的右侧,还有一个单独的删除按钮。表单使用一些bootstrap css。但是,删除按钮在页面上显示为一个小的灰色方块,其中没有文本。是什么让它显得如此奇怪?
<form id = "myform">
<div class="col-lg-6">
<h3> New Group: </h3>
<div class="input-group">
<input type="text" id = "input" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick = "addTag()" >Add</button>
</span>
</div><!-- /input-group -->
<table class = "table" padding = "5">
<ul id = "list" class="list-group">
</ul>
</table>
<button type = "button" class="btn btn-default" value = "Delete" id = "deleteBtn" onClick = "if(confirm('Are you sure?'))
Delete()"></button>
</form>
答案 0 :(得分:3)
您必须在value
之间移动文本
<button type = "button" class="btn btn-default" id = "deleteBtn" onClick = "if(confirm('Are you sure?')) Delete()">Delete</button>
答案 1 :(得分:0)
空间。您不应该在&#34; =&#34; -s之后使用空格。所以:
value = "Delete"
很糟糕。
value="Delete"
没关系。祝好运! : - )