+ 3

Button.js

How do I make a button in JavaScript? I know I asked a while ago but I was told only how to do it in HTML.

25th Aug 2018, 11:56 PM
Beepultin
Beepultin - avatar
8 Answers
+ 3
I am doing a series of buttons however, every time they both pop up and I click one they disappear so I am trying to make a button the appears after the first button works.
26th Aug 2018, 12:04 AM
Beepultin
Beepultin - avatar
+ 3
this the code i am doing
26th Aug 2018, 12:24 AM
Beepultin
Beepultin - avatar
+ 2
FYI - button.js is actually a bootstrap plug-in. https://www.w3schools.com/bootstrap/bootstrap_ref_js_button.asp
26th Aug 2018, 12:05 AM
Janning⭐
Janning⭐ - avatar
+ 2
https://code.sololearn.com/Wqv0O7A869rO/?ref=app
26th Aug 2018, 12:24 AM
Beepultin
Beepultin - avatar
+ 2
Interesting. Well you know how to use document.write to insert HTML and you know how to make a button with HTML to trigger JavaScript, so it seems like you have the skills you need to make it work. What did you want the second "button" to do?
27th Aug 2018, 7:21 AM
Janning⭐
Janning⭐ - avatar
+ 1
The "button" will either be in HTML and JavaScript gives it functionality, or you can generate an HTML "button" with JavaScript. Either way, it's going to end up as HTML. But let's back up a bit, because choosing how it should be done depends on what it should be doing. What do you want your "button" to do?
26th Aug 2018, 12:02 AM
Janning⭐
Janning⭐ - avatar
+ 1
Unless I missed it, your code currently only has the first button, not a second one.
28th Aug 2018, 3:34 AM
Janning⭐
Janning⭐ - avatar
0
To have a secound event but my problem is that the buttons disapear.
27th Aug 2018, 11:38 AM
Beepultin
Beepultin - avatar