Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use javascript or jQuery for this type of thing:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scriptingwhy avoid inline scripting and also why inline scripting is bad

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use javascript or jQuery for this type of thing:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use javascript or jQuery for this type of thing:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use Js o Jqueryjavascript or jQuery for this type of thingsthing:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use Js o Jquery for this type of things:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use javascript or jQuery for this type of thing:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad

Source Link
jonbarlo
  • 8.1k
  • 1
  • 54
  • 38

You should all know this is inline scripting and is not a good practice at all...with that said you should definitively use Js o Jquery for this type of things:

HTML

<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Online Student Portal</title> </head> <body> <form action=""> <input type="button" id="myButton" value="Add"/> </form> </body> </html> 

JQuery

var button_my_button = "#myButton"; $(button_my_button).click(function(){ window.location.href='Students.html'; }); 

Javascript

 //get a reference to the element var myBtn = document.getElementById('myButton'); //add event listener myBtn.addEventListener('click', function(event) { window.location.href='Students.html'; }); 

See comments why avoid inline scripting and also why inline scripting is bad