+ 1

Html onclick

I was looking at a source code then i saw onclick="javascript: ... .innerHtml" (... is irrelevant) what is the purpose of 'javascript:"

23rd Jul 2020, 1:45 PM
Eren
Eren - avatar
10 Respuestas
0
Event attribute calling using js.
23rd Jul 2020, 2:45 PM
shubham kumar
shubham kumar - avatar
+ 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.
23rd Jul 2020, 1:53 PM
BroFar
BroFar - avatar
+ 2
Eren you are referring to the behavior or action in a designer's purpose or animation ???
23rd Jul 2020, 2:08 PM
BroFar
BroFar - avatar
0
BroFar do you have any link or documentation that explains it further? I need to know what it does exaxtly
23rd Jul 2020, 1:56 PM
Eren
Eren - avatar
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:"
23rd Jul 2020, 2:03 PM
Eren
Eren - avatar
0
BroFar litteraly the argument This text ---> javascipt: <------ javasricpt: in the onclick argument
23rd Jul 2020, 2:26 PM
Eren
Eren - avatar
0
shubham kumar is it set by default because when we use functions we usually dont put it there
23rd Jul 2020, 2:48 PM
Eren
Eren - avatar
0
Eren ,To Onclick attribute added to any tag we have to assign function of js for its working.
23rd Jul 2020, 2:52 PM
shubham kumar
shubham kumar - avatar
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()
23rd Jul 2020, 2:53 PM
BroFar
BroFar - avatar