A标签中通过href和onclick传递的this对象
2013-04-18 19:11
351 查看
<a href="javascript:void(0);" onclick="test(this);">A标签测试</a>
想获取A 中的innerHTML
如果href="test(this);" 不但获取不到值,而且程序将退出,href引向不对。
function test(obj){ alert(obj); //js alert(obj.innerHTML); //jquery alert($(obj).html()); }
这是<a href="javascript:test(this);" >A标签测试</a>和<a href="javascript:void(0);" onclick="test(this);" >A标签测试</a>不同的地方
相关文章推荐
- A标签中通过href和onclick传递的this对象实现思路
- A标签中通过href和onclick传递的this对象
- A标签中通过href和onclick传递的this对象
- A标签中通过href和onclick传递的this对象
- A标签中通过href和onclick传递的this对象实现思路
- A标签中通过href和onclick传递的this对象
- A标签中通过href和onclick传递的this对象实现思路
- <a>标签中href和onclick传递this对象的实现方法
- <a>标签中 href 和 onclick 的区别,以及href="javascript:xxx(this);"与onclick="xxx(this);" 传递this参数的区别
- <a href="onclick="javascript:goSearch(this)" class="click" name="Java">Java</a>为什么a标签的父节点获取不到
- QTP的那些事---通过html标签的属性获取对象(类似onclick的属性)
- 通过给事件处理程序传递this参数,获取事件源对象的引用。单机提交按钮时在信息框中显示用户输入的字符。
- <a>标签使用onclick(this)来传递参数
- href与onclick()分别添加this对象
- a标签href属性传递参数,onclick属性传递参数
- 在Android中通过Intent使用Bundle传递对象
- Android 开发笔记——通过 Intent 传递类对象
- js中如何传递this对象
- Android 跳转Activity并通过Bundle对象传递数据