I have a span on my page. where I can very easily put onclick event but what I want is, "on click" event should be added on "onload" of the webpage. which can be done using jquery or js.
but I want to know. is it possible to do it using css or xslt.
but I want to know. is it possible to do it using css or xslt.
The most likely answer is no. CSS is for display but there are active selector which might be enough to fulfill your requirement. XSLT is an XML style sheet and can be used to generate HTML and JavaScript.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
16 Points
172 Posts
onclick event can be set using jquery or js. is it possible to set an event using css or xslt
Dec 14, 2019 03:03 PM|rajemessage|LINK
hi,
I have a span on my page. where I can very easily put onclick event but what I want is, "on click" event should be added on "onload" of the webpage. which can be done using jquery or js.
but I want to know. is it possible to do it using css or xslt.
yours sincerely
All-Star
53001 Points
23592 Posts
Re: onclick event can be set using jquery or js. is it possible to set an event using css or xslt
Dec 14, 2019 03:10 PM|mgebhard|LINK
The most likely answer is no. CSS is for display but there are active selector which might be enough to fulfill your requirement. XSLT is an XML style sheet and can be used to generate HTML and JavaScript.
Contributor
3730 Points
1412 Posts
Re: onclick event can be set using jquery or js. is it possible to set an event using css or xslt
Dec 16, 2019 10:04 AM|yij sun|LINK
Hi rajemessage,
As far as I think,CSS could execute onclick event. It relies on the pseudo-class and on the general sibling selector ~.
However,the onclick event isn't same with those which are set using javascript.It only be used in the Foreground code and change the style of page.
More details,you could refer to below article:
https://tympanus.net/codrops/2012/12/17/css-click-events/
Best regards,
Yijing Sun