2010-06-11 7 views
1

HI, Je souhaite trouver tous les éléments d'entrée dans une chaîne HTML dont l'affichage n'est pas défini sur none. J'ai essayé avec JQuery et il ne semble pas aimer chercher dans l'attribut de style. Des idées? J'ai le code HTML suivant:trouver l'attribut de style en utilisant jquery

<SPAN style="DISPLAY: none">4B holdings AG</SPAN><SPAN dropdownCell="onShowInvestorDropDown(ele, currentText)"></SPAN><INPUT style="DISPLAY: none" value="4B holdings AG" name=potbookgrid$ctl00$ctl08$ctl02> 
<DIV id=investorComboBoxPC> 
<DIV class="RadComboBox RadComboBox_Default" id=ctl02 style="DISPLAY: inline; WIDTH: 416px; ZOOM: 1" value="4B holdings AG"> 
<TABLE style="BORDER-TOP-WIDTH: 0px; TABLE-LAYOUT: fixed; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-COLLAPSE: collapse; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0 summary=combobox border=0> 
<TBODY> 
<TR> 
<TD class="rcbInputCell rcbInputCellLeft" style="MARGIN-TOP: -1px; MARGIN-BOTTOM: -1px; WIDTH: 100%"><INPUT class=rcbInput id=ctl02_Input style="DISPLAY: block" value="4B holdings AG" name=ctl02 autocomplete="off" jQuery1276253231647="1"></TD> 
<TD class="rcbArrowCell rcbArrowCellRight rcbArrowCellHidden" style="MARGIN-TOP: -1px; MARGIN-BOTTOM: -1px"><A id=ctl02_Arrow style="DISPLAY: block; OVERFLOW: hidden; POSITION: relative; outline: none">select</A></TD></TR></TBODY></TABLE> 
<DIV class=rcbSlide style="Z-INDEX: 6000"><IFRAME style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0); LEFT: 0px; BORDER-LEFT: 0px; WIDTH: 0px; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px" tabIndex=-1 src="javascript:'';" frameBorder=0>Your browser does not support inline frames or is currently configured not to display inline frames.</IFRAME> 
<DIV class="RadComboBoxDropDown RadComboBoxDropDown_Default " id=ctl02_DropDown style="DISPLAY: none; FLOAT: left; WIDTH: 416px"> 
<DIV class=rcbHeader id=ctl02_Header> 
<TABLE style="TABLE-LAYOUT: fixed"> 
<TBODY> 
<TR> 
<TD width=60>Investor Code</TD> 
<TD width=150>Investor Name</TD> 
<TD width=90>City</TD> 
<TD width=100>Country</TD></TR></TBODY></TABLE></DIV> 
<DIV class="rcbScroll rcbWidth" style="WIDTH: 100%" jQuery1276253231647="2"></DIV></DIV></DIV><INPUT id=ctl02_ClientState type=hidden value='{"logEntries":[],"value":"","text":"4B holdings AG","enabled":true}' name=ctl02_ClientState autocomplete="off"> </DIV></DIV> 
+0

Pouvez-vous montrer ce que vous avez essayé? –

+0

Avez-vous réellement ces éléments dans le DOM, ou juste une chaîne de ce contenu? –

+0

Je l'ai dans le DOM, c'était en fait le contenu d'une cellule. Ce dont j'ai besoin, c'est de tous les éléments d'entrée dont l'affichage est activé ou bloqué. Donc, ce que je voudrais de la trouver serait le "ctl02_Input". – Rubans

Répondre

0
$("input:visible").css("border","1px solid red"); 

?

+0

Excellent, cela fait ce dont j'ai besoin. – Rubans

Questions connexes