I am making a private webpage game in which you identify the color by only RGB displayed to you and I want to add "Score" system but I can't because I am using:
function CR(){ window.location.reload(false) }
which refreshes the whole page can someone show me how to make a part of the webpage refreshing without effecting everything?
Asked
Active
Viewed 361 times
-2

Jasser Ahmad
- 9
- 2
-
is there any reason not to use spa like react or vuejs ??? you can update the dom element if you only want to update specific element. – abhi patil Oct 30 '21 at 11:25
1 Answers
0
at first you should google it.
if you need get your data from backend, you should use ajax. Refresh/reload the content in Div using jquery/ajax ajax
if you don't need backend and you wanna change element value , so get your element by jQuery or JavaScript and set your value
$('#idTxt').val('new value');

hossein andarkhora
- 740
- 10
- 23
-
I am trying not to go off my programming courses as we are still learning the frontend and not the backend and I tried google it failed me alot – Jasser Ahmad Oct 30 '21 at 11:31
-
well , if you don't need backend it so easier . you can get your element by jQuery or JavaScript and set your value. don't forget , google and stackoverflow can be the best teacher to you – hossein andarkhora Oct 30 '21 at 11:37