Hacktoberfest - My 2nd
This is the second contribution I have made for Hacktoberfest.
It is a guess a number game.
The issue can be found here.
When I play this game, I found if I clicked the reset button, the difficult level come back to the default 1 to 100, but the radio option will stay at the previous one I chosen.
Here is the pull request I have made.
I add one line to set the radio option back to default, and also give the default option an id.
Firstly, I searched on the website by how to reset the radio to default value. There are many way, more complicated than what I finally did. And I found the author try to do this things either. I even found the code he leaved as a common just as same as I tried. But those doesn't work. Then I went back to W3School to learn the radio button. I made it, quite simple:)
I learned not always try to cut corners.
It is a guess a number game.
The issue can be found here.
When I play this game, I found if I clicked the reset button, the difficult level come back to the default 1 to 100, but the radio option will stay at the previous one I chosen.
Here is the pull request I have made.
I add one line to set the radio option back to default, and also give the default option an id.
Firstly, I searched on the website by how to reset the radio to default value. There are many way, more complicated than what I finally did. And I found the author try to do this things either. I even found the code he leaved as a common just as same as I tried. But those doesn't work. Then I went back to W3School to learn the radio button. I made it, quite simple:)
I learned not always try to cut corners.
Comments
Post a Comment