Xóa bài viết
Bạn có chắc chắn muốn xóa bài viết này không ?
Xóa bình luận
Bạn có chắc chắn muốn xóa bình luận này không ?
JavaScript: Tự thêm các kí tự đặc biệt theo format khi nhập vào kiểu Date, Time
HTML:
<p>Date: <input type="text" id="datepicker" placeholder="dd-MM-yyyy"/></p>
<p>Time: <input type="text" id="timeStartPicker" placeholder="HH:mm:ss"/></p>
JS:
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.maskedinput.js" type="text/javascript"></script>
$("#datepicker").mask("99-99-9999");
$("#timeStartPicker").mask("99:99:99");
Trong đó:
a - Thay thế cho kí tự chữ (A-Z,a-z)
9 - Thay thế cho kí tự số (0-9)
* - Thay thế cho kí tự chữ và số (A-Z,a-z,0-9)
Download:
Bình luận

{{ comment.user.name }}
Bỏ hay
Hay

Cùng một tác giả

1
0
function process() { getMD5( document.getElementById("myfileinput").files0], prog = console.log("Progress: " + prog) ).then( res = consol...

1
0
Chỉnh CSS: CSS .GridNoHeaderOfYou .kgridheader { height: 0; borderbottomwidth: 0; display: none; overflow: hidden; }

1
0
$("inpParentName").kendoDropDownList({ dataTextField: "name", dataValueField: "id", optionLabel: 'Choose...', dataSource: { transport: { read...
Bài viết liên quan

0
5
fCC: Technical Documentation Page note So I have finished the HTML part of this exercise and I want to come here to lament about the lengthy HTML ...