473,473 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I need to make buttons work and dont know how

1 New Member
So i have this code here:
Expand|Select|Wrap|Line Numbers
  1.     let submitButton = document.querySelector("#btn");
  2.     let myAddList = document.querySelector("#addList");
  3.  
  4.     submitButton.addEventListener("click", submitFunction);
  5.      function submitFunction(){
  6.  
  7.         let getName = document.querySelector("#firstName").value;
  8.         let getLastName = document.querySelector("#lastName").value;
  9.         let getNumber1 = document.querySelector("#number1").value;
  10.         let getNumber2 = document.querySelector("#number2").value;
  11.         let getNumber3 = document.querySelector("#number3").value;
  12.         let getDate = document.querySelector("#date").value;
  13.         let getID = document.querySelector("#id").value;
  14.  
  15.  
  16.  
  17.             myAddList.innerHTML += "<li style='list-style:none'>Name: "+getName+"<br> "+ "Last name: " + getLastName +
  18.              "<br>" + "Phone number: " + getNumber1 + " " + getNumber2 + " " + getNumber3 + "<br>" + "Birth date: " + getDate + "<br>"
  19.              + "ID: " + getID + "<br>" + "<button id='accept'  >Accept</<button>" + 
  20.               "<button id='denied'>Denied</button>" + "</li>";
  21.  
  22.  
  23.  
  24.         document.querySelector("#form").reset();
  25.     }
which lets me add student info with one button. Now the thing is that every new student list has to have 2 buttons accept and denied which are only visible if i hover onto the particular list of students.How can i make that work?
Jun 4 '22 #1
1 10242
dev7060
639 Recognized Expert Contributor
Now the thing is that every new student list has to have 2 buttons accept and denied which are only visible if i hover onto the particular list of students.How can i make that work?
You may use hover pseudo-class and toggle the visibility using the display property.
Jun 12 '22 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Chris Krasnichuk | last post by:
Hello every one, Does anyone know how to make php work on your computer? please reply I need help Chris
20
by: Chris Krasnichuk | last post by:
hello, Does anyone know how I make php work on "my" computer? I made a mistake in my last post so I fixed it here. Chris
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
2
by: hojjatnikan | last post by:
please help me this code 62EH&5gx0wiqoQFw is this name ( Belux) but i dont know how convert it i dont know the algorithm of this code plead help me
48
by: Nathan Sokalski | last post by:
Ever since I found out that they didn't give us a way to install both IE6 and IE7 on the same machine, I have been more frustrated and annoyed with Microsoft than I ever have been with any company...
7
by: Ron | last post by:
I have a couple of questions about this class.....: Public Class WordPair Private word1 As String Private word2 As String Public Sub New() word1 = "" word2 = "" End Sub Public Sub New(ByVal...
21
by: stephenrussett | last post by:
Ok i what i am trying to do is: I have a query that pumps out information like this: (1) (2) (3) (4) (5) 1 1 Cooper Street NS...
2
by: Tiruak | last post by:
Hi there. Thanks in advance for the people reading and trying to help. I'm very begginer using flash and action script, and I tryed to do this one navigation menu. Since I dont have experience...
2
by: Sreenivas | last post by:
I dont know how to compile cpp programs with gcc as i am new to gcc and cpp. could anybody help me out? Thanks&Regards, Srinivas Reddy Thatiparthy.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.