Home > Web Front-end > CSS Tutorial > Attached solution to the conflict between adding name and id to <a name> in htm page_Experience Exchange VIP Promotion

Attached solution to the conflict between adding name and id to <a name> in htm page_Experience Exchange VIP Promotion

PHP中文网
Release: 2016-05-16 12:05:15
Original
2265 people have browsed it

it turns out that there is a conflict between and . i spent a long time and was very depressed. the temporary solution is to add a 2 to the following id, which is

the core code used in the solution is as follows
the following code is placed at the bottom of the page that’s it

<script language="javascript"> 
var url=location.href; 
var urlarr=url.split("#"); 
var theid=urlarr[1]; 
document.getElementById(theid+"2").style.color="yellow"; 
</script>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template