html5中怎样让鼠标指向文字时变成手指可以点击跳转?

html-css08

html5中怎样让鼠标指向文字时变成手指可以点击跳转?,第1张

html中有一个标签,直接给文字添加一个a标签 ;\x0d\x0a比如:\x0d\x0a关于我们\x0d\x0aa标签默认的鼠标放上去就是一个手指的样式,或者你也可以用cursor: pointer这个给他设置一下,cursor还有其他的属性可以使用

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

<script type="text/javascript">

function A(){

alert("被点击了")

}

</script>

</head>

<body>

<a href="#" onclick=A()>Addfdsfd</a>

</body>

</html>

这样就可以了

把window.onload=function(){}去掉就有效果了