Call url in Javascript based on event

JAVASCRIPT


window.location = '/usersetting/portfolio/list/' + zid + '/';
 <input class="form-check-input" type="radio" name="radioportfolio" id="{{zrec.id}}" value="{{zrec.id}}" onclick="fn_set_portfolio(this.id)">


function fn_set_portfolio(zid) {
  window.location = '/usersetting/portfolio/list/' + zid + '/';
  }

 

 <div class="card" style="max-width:12rem;min-width:12rem;max-height: 12rem;" onclick="window.location = '/'">

 

            Related
Call url in Javascript based on event