+ 1
Html onclick
I was looking at a source code then i saw onclick="javascript: ... .innerHtml" (... is irrelevant) what is the purpose of 'javascript:"
10 Antworten
0
Event attribute calling using js.
+ 3
Eren the short answer is to cause or behave in different ways in response to a user's actions. However, js has a wide variety of creative abilities.
+ 2
Eren you are referring to the behavior or action in a designer's purpose or animation ???
+ 1
Eren I have a code or two which can demonstrate onclick
https://code.sololearn.com/WKk3i5vHt4SY/?ref=app
https://code.sololearn.com/W0SnL3Jhi4kb/?ref=app
and a link to an article about onclick
https://blog.hubspot.com/marketing/web-design-html-css-javascript
https://www.w3schools.com/jsref/event_onclick.asp
0
BroFar do you have any link or documentation that explains it further?
I need to know what it does exaxtly
0
BroFar no i know what an onclick is i was asking about the "javascript:" part that was set to onclick
edit: onclick="javascript:main.innerHtml" ehat is the purpose of "javascript:"
0
BroFar litteraly the argument
This text ---> javascipt: <------ javasricpt: in the onclick argument
0
shubham kumar is it set by default because when we use functions we usually dont put it there
0
Eren ,To Onclick attribute added to any tag we have to assign function of js for its working.
0
Eren it looks like imo that it is from where "javascript:" to fire and which part "main." and what to fire "innerHtml"
I looked at several sources and it looks like an sql format not (a) typical as onclick=main()