+ 1

JavaScript

Can someone helps me,to make that every bottons of this Laptop 💻 works and to see what i write on the Screen? Thanks 😊 https://code.sololearn.com/WAJ8y0WZIoRB/?ref=app

25th Jul 2018, 1:26 AM
App-Designer2
App-Designer2 - avatar
6 Réponses
+ 2
better solution is to replace your js functions with this doesnt require adding onclick to html, will need to add if else to handle special keys $(function() { $("button").click(function() { let message = $("#laptop").html() //value of currently displayed text key = $(this).html(); //value of key clicked +<br/> console.log(key); // used for debuggng key = key.slice(0,1); // removes trailing <br/> tag message = message + key; $("#laptop").html(message) }); });
25th Jul 2018, 6:12 PM
JME
+ 1
add an onClick function call to each button, use jquery to edit html where to want
25th Jul 2018, 6:20 AM
JME
+ 1
ok thank you so much Jason,i will try it later when i get at home,then i will let you if it works so😊👍🏽
25th Jul 2018, 6:30 PM
App-Designer2
App-Designer2 - avatar
+ 1
thanks it works 👌🏽😁💻
25th Jul 2018, 8:10 PM
App-Designer2
App-Designer2 - avatar
0
can you please write an example?
25th Jul 2018, 1:34 PM
App-Designer2
App-Designer2 - avatar