Web Technologies:How to load new page HTML and Javascript
<input type="button" id="test" value="test" onclick="window.location.replace('sample.html')" />
<input type="button" id="test" value="test" onclick="window.location.replace('sample.php')" />
<script
var val= "Hello";
var test= "action_sample.php?myvar=" + val;
</script>
<input type="button" value="test" onclick="window.location.replace(test)" />
window.location.replace("sample.php?myvar1=" + myvalue1+ "&myvar2=" + myvalue2);
window.location.replace("sample.php?myvar=hello world");
<script>
function MyFunc(){
var myvalue = "world";
window.location.replace("func.php?myvar=" + myvalue);
}
</script>
<input type="button" id="func" value="Func" onclick="MyFunc()" />
No comments:
Post a Comment