Is it possible to make HTML & CSS buttons run a C++ function when pressed?
<button onclick="function1()" class="button1">Login</button>
using namespace std;
//Something that affects the html & css if that exists
Thanks For Reading.
I’ll edit this with a Repl you can fork in a bit
It’s gonna take me a while to learn this lol.
Ugh… please don’t quote that whole thing, just reply to it.
aaa no I really dislike trying to get anything to work on Replit
so you have to install bunch of libraries and it’s late and I’d rather not
someone smarter than me can make it work, but basically:
- make c++ server that does the thing you want it to do at a certain route
- use js to fetch that
@HenryMiles3 may I ask why you’re using C++ instead of JS?
Prob just a choice (I can’t remember lol) and other personal reasons.
Do you know where I could learn the code which would actually execute something that effects the HTML & CSS?