1
I need to change the text of a label side by Javascript and then reload the page
Follow the code of the label
<asp:Label runat="server" ID="ValorMax" Visible="false">10</asp:Label>
You need to put javascript on this button
<input type="button" id="btn01" value="2" />
I need that when the id="btn01" button is clicked, change the Label id="Valormax" value from 10 to 20
Reload the page
I suggest you confirm how you have your code, because what you have put here is incomplete at label level, missing
<and>. In addition it is necessary to be more explicit in what you want to do exactly. Change thetextfor what value ? Based on what ? When this exchange should be made ?– Isac
I don’t know ASP very well, but if you put
document.getElementById('ValorMax').textContent = 20;on the page, this changes the value?– Sergio
Have some technical impediment to do this action via . net?
– Andre.Santarosa
Your question, until a certain point works, after the
reloadpage is lost value and come back 10 again.– novic