I'm my backend part of the app which is built in PHP Symfony I have HTML twig files, I want to change behavior for some href link, I want to hide URL in the bottom left corner after I hover them, I tried this solution that needs to change URL text to Contact, but it won't work
<a class="activo" href="{{ localo_path('en') }}" onmouseover="window.status='Contact'" onmouseout="window.status=''">Click</a>
any help?
TL;DR; Simply use JavaScript
, like:
window.location.href = "https://stackoverflow.com";
Remove the <a>
elements href
-attribute.
Then make it trigger a JavaScript function:
<a onclick="myFunction()">my link</a>
Finally, simply use JavaScript
to redirect, like:
<script type="text/javascript">
function myFunction() {
window.location.href = "https://stackoverflow.com";
}
</script>
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.