본문 바로가기

Java Script8

Clock 5.0 Intervals1) Interval : something that should happen every 'n'second.2) example function sayHello() {  console.log("hello");} -> If you want to execute this function every 2seconds. 3) setInterval - takes two argument.(1)  function that you want to run(2) the miliseconds that you want to wait between each call  setInterval(sayHello, 5000ms) = every 5second     5.1 Timeouts and Dates 1) setTim.. 2024. 8. 26.
Login Form 4.0 Input values     4.1 Forms Submission      4.2 Events function onLoginSubmit(event( { tomato=argumentpreventDefault(); -> to get what is the information the browser will give youconsole.log(event);} loginForm.addEventListener("submit", onLoginSubmit); all youre doing here, is youre creating a function that is called onLoginSubmit.And youre saying this function takes one argument. and youre g.. 2024. 8. 23.
Javascript on the browser 3.0 The body>script src="app.js">script>body> Console -> JSStyle -> CSSElement -> HTML 3.1 HTML in Javascriptdocument.getElementById("title") Javascript can take elements from HTML but its not showing HTML 2024. 8. 22.
Welcome to Javascript 2.0 To bring JS filebody>script src="app.js">script>body> Console -> JSStyle -> CSSElement -> HTML2.1 Basic data typesjavascript has type, and understand it automatically1) Number (Integer) = Full number, Float (eg. 0.5)2) Text (string) -> Always with " "  2.2~2.3 VariablesIn VScode, app.js console.log(value/string);-> print something(value/string) on your console Variable : Save or Hold Value.T.. 2024. 8. 2.