+ 3

Plz check this code my output is right but when it over it button says undefined what is this .plz fix this code

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

22nd Oct 2017, 5:19 AM
Arpan Kanwer
10 Answers
+ 4
Then add an element to store the text at; a new paragraph for example. <p id="change"></p> or don't use innerHTML at all. alert(a.charAt(0)+x.slice(1));
23rd Oct 2017, 1:23 PM
John Wells
John Wells - avatar
+ 5
alert does not return your param result
22nd Oct 2017, 5:22 AM
CalviŐ˛
CalviŐ˛ - avatar
+ 3
Separate your assignment to the button and the alert like this: document.getElementById("demo").innerHTML = a.charAt(0)+x.slice(1); alert(document.getElementById("demo").innerHTML);}
22nd Oct 2017, 6:14 AM
John Wells
John Wells - avatar
+ 3
Set best answer to John Wells, he deserves it.
23rd Oct 2017, 1:05 PM
CalviŐ˛
CalviŐ˛ - avatar
+ 3
thx bro that right answer
23rd Oct 2017, 1:23 PM
Arpan Kanwer
+ 2
can u fix this code.
22nd Oct 2017, 5:31 AM
Arpan Kanwer
+ 1
if u don care about alert result . you can try this button{text-transform:capitalize;} every 1st letter in button is capital
22nd Oct 2017, 8:31 AM
林偉雄
林偉雄 - avatar
+ 1
but with this my button value is changing
23rd Oct 2017, 1:05 PM
Arpan Kanwer
22nd Oct 2017, 8:32 AM
林偉雄
林偉雄 - avatar
22nd Oct 2017, 8:39 AM
林偉雄
林偉雄 - avatar