일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 쿠키런킹덤
- 오블완
- 쿠키런킹덤크리스마스
- 노마드코더
- SQL
- 쿠키런킹덤공략
- HTML
- Unity
- 자바스크립트
- 크리스마스
- programmers
- 쿠킹덤
- dart
- Spring
- 프로그래머스
- Java
- MySQL
- Eclipse
- 홀리데이익스프레스
- 웹개발
- 티스토리챌린지
- 자바
- 이클립스
- 쿠킹덤공략
- JavaScript
- 딥러닝
- oracle
- edwith
- 유니티
- 개발자
Archives
- Today
- Total
Dev study and notes
JSP JQEURY - input type=date 날짜 넣기 날짜 기본값 설정. 본문
반응형
해당 INPUT 부분에 오늘 날짜 넣기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html; charset=UTF-8" | |
pageEncoding="UTF-8"%> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Insert title here</title> | |
<!-- input에 오늘날짜 기본값으로 넣기 --> | |
<script type="text/javascript"> | |
window.onload = function() { | |
today = new Date(); | |
console.log("today.toISOString() >>>" + today.toISOString()); | |
today = today.toISOString().slice(0, 10); | |
console.log("today >>>> " + today); | |
bir = document.getElementById("todaybirthday"); | |
bir.value = today; | |
} | |
</script> | |
</head> | |
<body> | |
<input id="todaybirthday" type="date"> | |
</body> | |
</html> |
결과는 아래에....
끝~
반응형
'errorSolution' 카테고리의 다른 글
git 프로젝트 import 후 오류 (0) | 2021.03.09 |
---|---|
jsp 생성 이클립스 에러 해결 The superclass "javax.servlet.http.HttpServlet" was not found (0) | 2021.01.16 |
소스트리 오류 발생. push. login. git bash. sourcetree (0) | 2021.01.15 |
jsp 생성 이클립스 에러 해결 The superclass "javax.servlet.http.HttpServlet" was not found (0) | 2021.01.02 |
이클립스 주석 (파일정보/ 메소드정보) 자동완성 설정하기 (0) | 2020.12.31 |