How to remove value of input tag by button tag with jquery? | Sololearn: Learn to code for FREE!

+3

How to remove value of input tag by button tag with jquery?

https://code.sololearn.com/WWtIEnsa69M0/?ref=app

10/23/2021 5:56:20 AM

Qufu[ISLAM-SOLDIER]

12 Answers

New Answer

+4

Samialloh Your included jQuery library is not working. Try another SAN That is with JavaScript not jQuery. https://code.sololearn.com/W2ns1T4iobWT/?ref=app

+4

Samialloh Add click event on button and reset data

+4

Samialloh One more thing val() can be use to set and get textbox value And html() is used to get and set value inside any tag $("#input").val(""); //this will set value var a = $("#input").val(); //this will get value ------- $("#input").html(""); //this will set value in any html tag var val = $("#input").html(); //this will get value from any tag

+3

https://code.sololearn.com/WKfSkSUv3uW9/?ref=app

+3

A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ Samialloh Sorry, I didn't notice.

+1

SAN Nick Nila (아미)

+1

SAN A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ ♡♡♡》Thanks guys😁《♡♡♡

+1

Really guys thanks for helping me😭

+1

Oww i just forgot to use "" 🤣🤣🤣 . Thank you A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ .🧐👌🏻

+1

SAN Aaa! No problem big bro its all perfect 🧐👌🏻. Thank for you code because now i know how use in JS too.

+1

Stacey Prahl https://code.sololearn.com/WKEf1G9TM8Tm/?ref=app Console.log(this.name +":", this number). Maybe this will help you😁

0

I am working in JavaScript, Contact Manager project (#36). I need a space after colon and before the number function contact(name,number){ this.name = name; this.number = number; this.print = print; } function print(){ console.log(this.name + ":" + this.number) } var a=new.contact("David",12345); var b=new.contact("Amy",987654321) a.print(); b.print(); Why is my code not providing a space between tne name and the number?