Mel*_*nda 1 jquery jquery-selectors
继我的上一个问题之后.我现在有这个:
<a id='testOne'>One</a>
Run Code Online (Sandbox Code Playgroud)
这个javascript:
//To remove the title and default action.
$("#testOne").attr("title", "").click(function(e){
e.preventDefault();
}).attr("onclick", null);
//To reset the title and action
$("#testOne").attr("title", "Test One").click(function(e){
doTest('one');
});
Run Code Online (Sandbox Code Playgroud)
但是当我的链接(它的样式像按钮)被重置时,光标是十字准线而不是指针.我检查了它,它被设置为auto.有什么办法可以将它设置为指针吗?
Sha*_*oli 10
那是因为你在锚标签中没有href属性.试试这个
<a id='testOne' href="#">One</a>
Run Code Online (Sandbox Code Playgroud)
要么
<a id='testOne' href="javascript:void(0);">One</a>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6001 次 |
| 最近记录: |