Home>Article>Web Front-end> Summary of JavaScript knowledge points: functions and events

Summary of JavaScript knowledge points: functions and events

coldplay.xixi
coldplay.xixi forward
2021-01-07 10:10:16 1730browse

Summary of JavaScript knowledge points: functions and events

Related free learning recommendations:javascript(video)

JavaScript function With events

1. Custom function

The sample is as follows:

 

2.JavaScript system function

  • parseInt() Convert the string to an integer
  • parseFloat() Convert the string to a decimal
  • isNaN() Determine whether it is NaN (number)
  • eval() runs the js code formed as a string and returns the execution result
##eval example:

 

2 .JavaScript eventPage event:
onload() Page loading
onblur() Lose focus
onfocus() Gain focus
onchange() Input box changes
Mouse Event:
onclick() click
onmousedown() mouse move in
onmouseout() mouse move out
onmousemove() mouse move
Keyboard event:
onkeypress()
Form event :
onsubmit()

onload example:

JavaScript Browser Object Model

window() Top-level objecthostory() browser record object
location() address object
document() document object

location() properties and methods


window() 属性window( ) method

Summary of JavaScript knowledge points: functions and eventswindow() attribute

Summary of JavaScript knowledge points: functions and eventsnavigator() method

Summary of JavaScript knowledge points: functions and eventsnavigator() attribute

Summary of JavaScript knowledge points: functions and eventsscreen() attribute

Summary of JavaScript knowledge points: functions and eventshistory() method

Summary of JavaScript knowledge points: functions and events

The above is the detailed content of Summary of JavaScript knowledge points: functions and events. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete
Previous article:What is jquery.min.js Next article:What is jquery.min.js