2021-05-07 13:03:53 -04:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<a href="/home">BBB</a>
|
|
|
|
<b id="aaaa">bbb</b>
|
|
|
|
<a id="blabla" href="/" rel="nofollow">
|
|
|
|
<b>AAA</b><u id="ble">UUU</u>AAAAAAA
|
|
|
|
</a>
|
|
|
|
<a id="bb" href="/">BB</a>
|
|
|
|
<script>
|
|
|
|
function aa()
|
|
|
|
{
|
2021-11-10 12:05:35 -05:00
|
|
|
window.alert(document.getElementById('blabla').hasAttribute('rel'));
|
2021-05-07 13:03:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function bb()
|
|
|
|
{
|
2021-11-10 12:05:35 -05:00
|
|
|
window.alert(document.getElementById('ble').hasAttribute('href'));
|
2021-05-07 13:03:53 -04:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<button onclick="return aa()">blabla rel true</button>
|
|
|
|
<button onclick="return bb()">ble href false</button>
|
|
|
|
</body>
|
|
|
|
</html>
|