具有多个属性的jquery选择元素 [英] jquery select element with multiple attributes
问题描述
好吧,我现在有一个大脑,现在有jquery的选择器过程(是的,这是很混乱的开始)。
Ok..i'm having a brainfart right now with jquery's selector process (yes, it's quite confusing to start).
我有2个输入元素
这里是我的输入:
< input value =blahblah@blah.comname =Emailtype =hidden>
< input value =blahblah@blah.comid =Emailname =Emailtype =text>
我对#Email有一个模糊方法,将删除隐藏的电子邮件字段。不幸的是,我很难定位到移除它。
I have a blur method on #Email that will remove the hidden Email field. Unfortunately, I'm having a hard time targeting it to remove it.
有人可以帮助缓解我的大脑吗?我尝试使用:not,多个属性等。隐藏的字段是服务器生成的,我不能阻止它被发回。
Can someone help relieve my brainfart? I tried using :not, multiple attributes, etc. The hidden field is server generated and I can't stop it from being sent back.
想法?
推荐答案
$('input[type=hidden][name=Email]').remove();
您可以在此处了解有关jQuery选择器的详情。
should do. You can learn more about jQuery selectors here.
这篇关于具有多个属性的jquery选择元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!