Elements in a function

Posted under » JavaScript on 29 Oct 2018

Sometimes we need to reuse a certain function. You do this by using elements.

If you need to do a single link, you do this. However, you can make this URL flexible using elements

<button onclick="visitPage('2018');">2018</button>

The script.

 function visitPage(year){

However, most of the time, the elements are at getElementById.

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css