使用 Inputmask jquery 插件默认占位符文本不显示
Using Inputmask jquery plugin default placeholder text not displayed
我正在使用输入掩码 jQuery 插件,但默认情况下我无法看到占位符文本,但悬停时会显示它。
$("input[name='birth_year_1']").inputmask("dd/mm/yyyy", {
placeholder: "dd/mm/yyyy"
});
$(document).ready(function(){
$("#date").inputmask("99/99/9999",{ "placeholder": "dd/mm/yyyy", clearMaskOnLostFocus: false});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/gh/RobinHerbots/jquery.inputmask@5.0.6/dist/jquery.inputmask.min.js" type="text/javascript"></script>
</head>
<body>
<input id="date" type="text" value="" />
</body>
</html>
我正在使用输入掩码 jQuery 插件,但默认情况下我无法看到占位符文本,但悬停时会显示它。
$("input[name='birth_year_1']").inputmask("dd/mm/yyyy", {
placeholder: "dd/mm/yyyy"
});
$(document).ready(function(){
$("#date").inputmask("99/99/9999",{ "placeholder": "dd/mm/yyyy", clearMaskOnLostFocus: false});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/gh/RobinHerbots/jquery.inputmask@5.0.6/dist/jquery.inputmask.min.js" type="text/javascript"></script>
</head>
<body>
<input id="date" type="text" value="" />
</body>
</html>