I was looking at a source code then i saw onclick="javascript: ... .innerHtml" (... is irrelevant) what is the purpose of 'javascript:"
7/23/2020 1:45:04 PM
Eren10 Answers
New AnswerEren 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.
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
BroFar do you have any link or documentation that explains it further? I need to know what it does exaxtly
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:"
BroFar litteraly the argument This text ---> javascipt: <------ javasricpt: in the onclick argument
shubham kumar is it set by default because when we use functions we usually dont put it there
Eren ,To Onclick attribute added to any tag we have to assign function of js for its working.
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()
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message