我有这个脚本的问题。CSS文本对齐属性无法正常工作
输出不与中心对齐;只有红色才能正常工作。
<script>
$(document).ready(function() {
$("#register_form input").focus(function() {
$("#status").fadeOut(800);
});
$("#pass1").keyup(function() {
if ($(this).val().length < 6) {
$("#output_pass1").css("color", "red").css('text-align', 'center').html("<br/><br/>very short ");
}
});
});
</script>
,这是HTML代码:
<label for="pass1">Password :</label>
<div class="col-sm-5">
<input type="Password" id="pass1" placeholder="Enter your password " required>
</div>
<small id="output_pass1" ></small>
请显示更多的html代码。 – Akhlesh
我编辑了我的代码 –
你能提供一个小提琴的工作? –