I wish to make a menu. Usually to help the visitor to get to a specific area I'll use this method :<a href="#id"> to a javascript
<a href="#id">
would scroll to an element on the current page such as <div id="id">
.
I wish to know can this be possible to write in javascript? such as my guess
<a href="javascript:#id"></a> <div id="id">
Why do you want to use javascript instead of ' '? –
試してみてください:https://stackoverflow.com/a/2368393/8237835 –
[JavaScript - アンカーにジャンプ]可能な複製(https://stackoverflow.com/questions/5694686/javascript-jump-to-anchor) –