I am trying to use js functions to improvise navigation in my website, although I am not able to parse the function in using document.function.href. I have simplified my code here for clarity. Please help me.
<button href="javascript:document.location.href=destinationFunc("target.html");">PRESS</button>
<button onclick="var lnk='target.html'; document.location.href=destinationFunc(lnk);">PRESS</button>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.