JSFiddle - React, Tailwind, and code Playground
by Mansfield
HTML
<button id="test1">Reload 1</button>
<button id="test2">Reload 2</button>
JavaScript
var Refresh = function (flag) {
location.reload(flag);
}
var Redirect = function (url) {
window.location.href = url;
Refresh();
}
var RefreshAppendUrl = function (append) {
var url = window.location.href;
url = url + append;
Redirect(url);
}
$("#test1").click(function () {
RefreshAppendUrl("#hello");
});
$("#test2").click(function () {
RefreshAppendUrl("?test=test");
});