扫码关注官方订阅号
function delInput(){ $(this).parent().remove(); } window.delInput = delInput;
<p><a onclick="delInput()">删除</a></p>
貌似删除获取不到p是为什么
闭关修行中......
window.delInput = delInput;
这么估计不行,你要传this的话 直接在
<p><a onclick="delInput(this)">删除</a></p> function delInput(that){ $(that).parent().remove(); }
这边的this指向window
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
这么估计不行,你要传this的话 直接在
这边的this指向window