When a tag is clicked in HTML triggering an onclick event, the CSS property that was updated in the JavaScript does not persist. The changes appear momentarily and then disappear once the window is refreshed.
Javascript:
<script type="text/javascript">
function Redirect() {
window.location.replace("http://127.0.0.1:5000/testlink");
document.getElementsById('tab1').style.cssText = 'color:blue; font-size:22px;';
}
</script>
HTML:
<input type="radio" name="tabset" id="tab1" aria-controls="rawdata" onclick="Redirect()">
Raw Data
This issue occurs when the tab is clicked, causing the CSS property changes to briefly take effect before disappearing upon refreshing the window.