我正在尝试检测从上一页单击的锚链接。
我有一个像
索引.html
<a href='test.html#project1'>project1</a><a href='test.html#project2'>project2</a><a href='test.html#project3'>project3</a>
bunch of stuff...
测试.html
<a href='#project1'>project1</a><a href='#project2'>project2</a><a href='#project3'>project3</a>
<a id = 'project1'>bunch of stuff......</a>
bunch of stuff
<a id = 'project2'>bunch of stuff......</a>
bunch of stuff
<a id = 'project3'>bunch of stuff......</a>
bunch of stuff
我想将点击的链接文本颜色更改为红色和更大的尺寸。因此,当用户从index.html中单击 project1 时, text.html文本上的 project1将变为红色且更大。
无论如何通过CSS或jQuery来做到这一点?
谢谢!