HI, 我想在HTML字符串中找到显示未设置为none的所有输入元素。 我尝试过使用JQuery,它似乎不喜欢在style属性中查找。 有任何想法吗? 我有以下HTML:
<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 :(得分:0)
$("input:visible").css("border","1px solid red");