- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
得到以下 Html block ...
<div style="visibility:visible" id="stateProvinceDiv">
<div id="stateUSALabelDiv"><label for="stateUSAIdSelect">Find Your Bookstore</label></div>
<select size="1" id="stateUSAIdSelect" name="stateUSAId">
<option>Loading...</option>
</select>
</div>
选择的页面/内容是由 javascript 函数/调用生成的...我可以获取该页面,因此我得到了一个 HtmlPage 实例。
鉴于我不知道如何获取选择/选项DOM 中有一个“form”元素。指向代码块的指针处理这个问题将不胜感激。
实际的 Html 如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>College Textbooks: College Apparel, College Gifts & Used College Books: eFollett.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="From used college books to up-to-date college textbooks and great college gifts like your school?s latest college apparel and more, visit efollett.com."/>
<meta name="keywords" content="college textbooks, used college books, college apparel, college gifts"/>
<script type="text/javascript" src="/wcsstore/HostedStoreFrontAssetStore/javascript/prototype-1.5.0.js"></script>
<script type="text/javascript" src="/wcsstore/HostedStoreFrontAssetStore/javascript/Util.js"></script>
<script type="text/javascript" src="/wcsstore/HostedStoreFrontAssetStore/javascript/flPrototypeHelper.js"></script>
<link rel="stylesheet" href="/wcsstore/HostedStoreFrontAssetStore/css/style1.css" type="text/css" />
</head>
<body onload="accessibleSelect();" id="global">
<!-- BEGIN COREMETRICS SUPPORT -->
<script language="javascript1.2" src="/wcsstore/HostedStoreFrontAssetStore/javascript/eluminate.js" type="text/javascript"></script>
<script language="javascript1.2" src="/wcsstore/HostedStoreFrontAssetStore/javascript/cmdatatagutils_WC.js" type="text/javascript"></script>
<script language="javascript1.2" type="text/javascript">
//<![CDATA[
cmSetProduction();
var cm_ClientID="90227440";
cmCreatePageviewTag("efollett Home Page","10051_HOME",null,null,"10051");
//]]>
</script>
<!-- END COREMETRICS -->
<div id="wrap">
<!-- start header -->
<table width="900" border="0" cellpadding="0" cellspacing="0" id="header">
<tr>
<td>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="skip_to_content" align="left" valign="top">
<ul>
<li><a href="#content" title="Skip to Content">Skip to Content</a></li>
</ul>
</td>
<td align="right" valign="top" id="your_account">
<ul>
<li> <strong>Serving Colleges and Universities</strong> | Online and On Campus</li>
<li> | <a href="/webapp/wcs/stores/servlet/FLLogon?langId=-1&catalogId=10001&storeId=10051" title="Your Account">Your Account</a></li>
<li> | Shopping Cart<span class="cart_total">: 0</span> | </li>
<li>Subtotal:<span class="subtotal"> $0.00</span> </li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img src="http://images.efollett.com/htmlroot/images/templates/storeLogos/411.gif" alt="efollett.com. Online. On Campus." width="272" height="168" border="0" />
<img src="http://images.efollett.com/htmlroot/images/templates/storeBanners/411.jpg" alt="" width="624" height="168" border="0" /></td>
</tr>
<tr>
<td id="top_nav">
<h2 class="invisible">Site Menu</h2>
<ul>
<li><a href="/Home/10001-10051-1?demoKey=d" title="Home">Home</a></li>
<li>
| <a href="/webapp/wcs/stores/servlet/SpecialOfferView?langId=-1&catalogId=10001&storeId=10051&demoKey=d" title="Special Offers">Special Offers</a>
</li>
<li> | <a href="/webapp/wcs/stores/servlet/HelpStoreInfoView?langId=-1&catalogId=10001&storeId=10051&demoKey=d" title="Contact Us">Contact Us</a></li>
<li> |<a href="/webapp/wcs/stores/servlet/BuybackInfoView?langId=-1&catalogId=10001&storeId=10051&demoKey=d">Cash For Books</a></li>
</ul></td>
<tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<!-- START CONTENT -->
<td align="left" valign="top"><!--intro table-->
<table border="0" cellspacing="5" cellpadding="0" width="899">
<tr>
<td align="left" valign="top" width="203"><img src="http://images.efollett.com/htmlroot/images/templates/endeca/global/global_merch.jpg" alt="" width="203" height="140" /></td>
<td align="left" valign="top"><h1 class="secondaryPageHeaderHomepage"><a name="content" id="thecontent"></a>
Welcome to the efollett.com network of online bookstores!</h1>
<p> efollett.com provides you with access to over 1,200 online bookstores across the United States and Canada so you can quickly locate your campus store. </p><p> Order your college textbooks, used college books and merchandise by shopping your bookstore's online website. Each bookstore selects the college apparel and other products from their store inventory and fulfills the order, so you are actually shopping at your local bookstore. We do it this way because your campus bookstore is the best source for textbooks, college gifts and merchandise specific to your campus. </p><p><strong>Please locate your college, university or school from our drop down menus below</strong></p></td>
</tr>
</table>
<div id="storefinder">
<table cellpadding="0" cellspacing="6">
<tr style="border: none;">
<td style="border: none;">
<div id="errorDiv" style="display:none;visibility:hidden;color:red;" class="text"> </div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<!-- <img src="http://images.efollett.com/htmlroot/images/templates/storeLogos/us_university." width="290" border="0" /> -->
<h2 class="us">U.S. College and Universities</h2>
<br />
<div style="visibility:visible" id="stateProvinceDiv">
<div id="stateUSALabelDiv"><label for="stateUSAIdSelect">Find Your Bookstore</label></div>
<select size="1" id="stateUSAIdSelect" name="stateUSAId">
<option>Loading...</option>
</select>
</div>
<br />
<div style="display:none;visibility:hidden" id="institutionUSADiv">
<div id="institutionUSALabelDiv"><label for="institutionUSAIdSelect">Select Your Institution</label></div>
<select size="1" id="institutionUSAIdSelect" name="institutionUSAId">
</select>
</div>
<br />
<div style="display:none;visibility:hidden" id="campusUSADiv">
<div id="campusUSALabelDiv"><label for="campusUSAIdSelect">Select Your Campus</label></div>
<select size="1" id="campusUSAIdSelect" name="campusUSAId">
</select>
</div>
<br />
<div style="display:none;visibility:hidden" id="programUSADiv">
<div id="programUSALabelDiv"><label for="programUSAIdSelect">Select Your Program</label></div>
<select size="1" id="programUSAIdSelect" name="programUSAId"></select>
</div>
<div id="buttonDivUS"></div>
<img src="http://images.efollett.com/htmlroot/images/templates//spacer.gif" width="1" height="3" hspace="0" vspace="0" border="0" alt="" />
</td>
<td align="left" valign="top">
<h2 class="canada">Canada Colleges and Universities </h2>
<br />
<div style="visibility:visible" id='stateProvince2Div'>
<div id='stateCALabelDiv'><label for="stateCAIdSelect">Find Your Bookstore</label></div>
<select size="1" id="stateCAIdSelect" name="stateCAId">
<option>Loading...</option>
</select>
</div>
<br />
<div style="display:none;visibility:hidden" id="institutionCADiv">
<div id="institutionCALabelDiv"><label for="institutionCAIdSelect">Select Your Institution</label></div>
<select size="1" id="institutionCAIdSelect" name="institutionCAId"></select>
</div>
<br />
<div style="display:none;visibility:hidden" id="campusCADiv">
<div id="campusCALabelDiv"><label for="campusCAIdSelect">Select Your Campus</label></div>
<select size="1" id="campusCAIdSelect" name="campusCAId"></select>
</div>
<br />
<div style="display:none;visibility:hidden" id="programCADiv">
<div id="programCALabelDiv"><label for="programCAIdSelect">Select Your Program</label></div>
<select size="1" id="programCAIdSelect" name="programCAId"></select>
</div>
<div id="buttonDivCA"></div>
<img src="http://images.efollett.com/htmlroot/images/templates//spacer.gif" width="1" height="3" hspace="0" vspace="0" border="0" alt="" />
</td>
<td align="left" valign="top">
<h2 class="us">U.S Schools K-12 </h2>
<br />
<div style="visibility:visible" id="stateProvince3Div">
<div id="stateUSK12LabelDiv"><label for="stateUSK12IdSelect">Find Your Bookstore</label></div>
<select size="1" id="stateUSK12IdSelect" name="stateUSK12Id">
<option>Loading...</option>
</select>
</div>
<br />
<div style="display:none;visibility:hidden" id="institutionUSK12Div">
<div id="institutionUSK12LabelDiv"><label for="institutionUSK12IdSelect">Select Your Institution</div>
<select size="1" id="institutionUSK12IdSelect" name="institutionUSK12Id"></select>
</div>
<br />
<div style="display:none;visibility:hidden" id="campusUSK12Div">
<div id="campusUSK12LabelDiv"><label for="campusUSK12IdSelect">Select Your Campus</label></div>
<select size="1" id="campusUSK12IdSelect" name="campusUSK12Id"></select>
</div>
<br />
<div style="display:none;visibility:hidden" id="programUSK12Div">
<div id="programUSK12LabelDiv"><label for="programUSK12IdSelect">Select Your Program</label></div>
<select size="1" id="programUSK12IdSelect" name="programUSK12Id"></select>
</div>
<div id="buttonDivK12"></div>
<img src="http://images.efollett.com/htmlroot/images/templates//spacer.gif" width="1" height="3" hspace="0" vspace="0" border="0" alt="" />
</td>
</tr>
</table>
<script type="text/javascript">
//<![CDATA[
String.prototype.startsWith = function(s) { return this.indexOf(s)==0; }
var uri = '/webapp/wcs/stores/servlet/StoreFinderAJAX';
var servletPath = '/webapp/wcs/stores/servlet/';
var pageType = 'FLGStoreCatalogDisplay';
var catalogId = '10001';
var categoryId = 'null';
var langId = '-1';
var demoKey = 'null';
var extraParams = 'null'; // only used for User Registration page
var multiSelect = false;
var forwardURLLocation = '';
// This map is used to determine the URI used for forwarding the user
var forwardPage = Object;
forwardPage['FLGStoreCatalogDisplay'] = 'StoreCatalogDisplay';
forwardPage['FLUserSelectSchool'] = 'UserAccountUpdateDemographicsForm';
forwardPage['FLGBuybackInfoPage'] = 'AboutBuybackView';
forwardPage['FLEdoptionsDisplayGlobal'] = 'EdoptionSearchView';
forwardPage['CGSelectStoreDisplay'] = 'CustomtsSelectedStore';
forwardPage['FLLocateStoreCourseMaterials'] = 'LocateCourseMaterialsView';
forwardPage['FLGGenMerchDisplay'] = 'CategoryDisplay';
function onPageLoad() {
AjaxQueue.setBatchSize(1);
getData(buildParms('STATESUS', 'US', 'stateUSAIdSelect'));
getData(buildParms('STATESCA','CA', 'stateCAIdSelect'));
getData(buildParms('STATESK12','K12', 'stateUSK12IdSelect'));
}
accessibleSelect=function(){
var selectedStateUSIndex;
var selectedInstUSIndex;
var selectedCampusUSIndex;
var selectedProgramUSIndex;
var selectedStateCAIndex;
var selectedInstCAIndex;
var selectedCampusCAIndex;
var selectedProgramCAIndex;
var selectedStateK12Index;
var selectedInstK12Index;
var selectedCampusK12Index;
var selectedProgramK12Index;
var stateUSAIdSelectBox = document.getElementById("stateUSAIdSelect");
stateUSAIdSelectBox.onchange=function(){
callUSStateAjax();
};
stateUSAIdSelectBox.onkeyup=function(e){
callUSStateAjax();
};
function callUSStateAjax() {
if(selectedStateUSIndex != stateUSAIdSelectBox.selectedIndex) {
doAJAXSelect("onStateUSASelect()");
selectedStateUSIndex = stateUSAIdSelectBox.selectedIndex;
selectedInstUSIndex = '';
selectedCampusUSIndex = '';
selectedProgramUSIndex = '';
}
}
var institutionUSAIdSelectBox = document.getElementById("institutionUSAIdSelect");
institutionUSAIdSelectBox.onchange=function(){
callInstUSAjax();
};
institutionUSAIdSelectBox.onkeyup=function(e){
callInstUSAjax();
};
function callInstUSAjax() {
if(selectedInstUSIndex != institutionUSAIdSelectBox.selectedIndex) {
doAJAXSelect("onInstituteUSASelect()");
selectedInstUSIndex = institutionUSAIdSelectBox.selectedIndex;
selectedCampusUSIndex = null;
selectedProgramUSIndex = null;
}
}
var campusUSAIdSelectBox = document.getElementById("campusUSAIdSelect");
campusUSAIdSelectBox.onchange=function(){
callCampusUSAjax();
};
campusUSAIdSelectBox.onkeyup=function(e){
callCampusUSAjax();
};
function callCampusUSAjax() {
if(selectedCampusUSIndex != campusUSAIdSelectBox.selectedIndex) {
doAJAXSelect("onCampusSelect_USA()");
selectedCampusUSIndex == campusUSAIdSelectBox.selectedIndex;
selectedProgramUSIndex = null;
}
}
var programUSAIdSelectBox = document.getElementById("programUSAIdSelect");
programUSAIdSelectBox.onchange=function(){
callProgramUSAjax();
};
programUSAIdSelectBox.onkeyup=function(e){
callProgramUSAjax();
};
function callProgramUSAjax() {
if(selectedProgramUSIndex != programUSAIdSelectBox.selectedIndex) {
doAJAXSelect("onProgramSelect_USA()");
selectedProgramUSIndex = programUSAIdSelectBox.selectedIndex;
}
}
var stateCAIdSelectBox = document.getElementById("stateCAIdSelect");
stateCAIdSelectBox.onchange=function(){
callStateCAAjax();
};
stateCAIdSelectBox.onkeyup=function(e){
callStateCAAjax();
};
function callStateCAAjax() {
if(selectedStateCAIndex != stateCAIdSelectBox.selectedIndex) {
doAJAXSelect("onStateCASelect()");
selectedStateCAIndex = stateCAIdSelectBox.selectedIndex;
selectedInstCAIndex = null;
selectedCampusCAIndex = null;
selectedProgramCAIndex =null;
}
}
var institutionCAIdSelectBox = document.getElementById("institutionCAIdSelect");
institutionCAIdSelectBox.onchange=function(){
callInstCAAjax();
};
institutionCAIdSelectBox.onkeyup=function(e){
callInstCAAjax();
};
function callInstCAAjax() {
if(selectedInstCAIndex != institutionCAIdSelectBox.selectedIndex) {
doAJAXSelect("onInstituteCASelect()");
selectedInstCAIndex = institutionCAIdSelectBox.selectedIndex;
selectedCampusCAIndex = null;
selectedProgramCAIndex = null;
}
}
var campusCAIdSelectBox = document.getElementById("campusCAIdSelect");
campusCAIdSelectBox.onchange=function(){
callCampusCAAjax();
};
campusCAIdSelectBox.onkeyup=function(e){
callCampusCAAjax();
};
function callCampusCAAjax() {
if(campusCAIdSelectBox != campusCAIdSelectBox.selectedIndex) {
doAJAXSelect("onCampusSelect_CA()");
selectedCampusCAIndex == campusCAIdSelectBox.selectedIndex;
selectedProgramCAIndex = null;
}
}
var programCAIdSelectBox = document.getElementById("programCAIdSelect");
programCAIdSelectBox.onchange=function(){
callProgramCAAjax();
};
programCAIdSelectBox.onkeyup=function(e){
callProgramCAAjax();
};
function callProgramCAAjax() {
if(selectedProgramCAIndex != programCAIdSelectBox.selectedIndex) {
doAJAXSelect("onProgramSelect_CA()");
selectedProgramCAIndex = programCAIdSelectBox.selectedIndex;
}
}
var stateUSK12IdSelectBox = document.getElementById("stateUSK12IdSelect");
stateUSK12IdSelectBox.onchange=function(){
callStateK12Ajax();
};
stateUSK12IdSelectBox.onkeyup=function(e){
callStateK12Ajax();
};
function callStateK12Ajax() {
if(selectedStateK12Index != stateUSK12IdSelectBox.selectedIndex) {
doAJAXSelect("onStateUSK12Select()");
selectedStateK12Index = stateUSK12IdSelectBox.selectedIndex;
selectedInstK12Index = null;
selectedCampusK12Index = null;
selectedProgramK12Index = null;
}
}
var institutionUSK12IdSelectBox = document.getElementById("institutionUSK12IdSelect");
institutionUSK12IdSelectBox.onchange=function(){
callInstK12Ajax();
};
institutionUSK12IdSelectBox.onkeyup=function(e){
callInstK12Ajax();
};
function callInstK12Ajax() {
if(selectedInstK12Index != institutionUSK12IdSelectBox.selectedIndex) {
doAJAXSelect("onInstituteUSK12Select()");
selectedInstK12Index = institutionUSK12IdSelectBox.selectedIndex;
selectedCampusK12Index = null;
selectedProgramK12Index = null;
}
}
var campusUSK12IdSelectBox = document.getElementById("campusUSK12IdSelect");
campusUSK12IdSelectBox.onchange=function(){
callCampusK12Ajax();
};
campusUSK12IdSelectBox.onkeyup=function(e){
callCampusK12Ajax();
};
function callCampusK12Ajax() {
if(selectedCampusK12Index != campusUSK12IdSelectBox.selectedIndex) {
doAJAXSelect("onCampusSelect_USK12()");
selectedCampusK12Index == campusUSK12IdSelectBox.selectedIndex;
selectedProgramK12Index = null;
}
}
var programUSK12IdSelectBox = document.getElementById("programUSK12IdSelect");
programUSK12IdSelectBox.onchange=function(){
callProgramK12Ajax();
};
programUSK12IdSelectBox.onkeyup=function(e){
callProgramK12Ajax();
};
function callProgramK12Ajax() {
if(selectedProgramK12Index != programUSK12IdSelectBox.selectedIndex) {
doAJAXSelect("onProgramSelect_USK12()");
selectedProgramK12Index = programUSK12IdSelectBox.selectedIndex;
}
}
}
// Start state
function onStateUSASelect() {
hideLayer("errorDiv");hideLayer("programUSADiv");hideLayer("campusUSADiv");showLayer("institutionUSADiv");addLoadingOption("institutionUSA");
hideLayer("programCADiv");hideLayer("campusCADiv");hideLayer("institutionCADiv");
hideLayer("programUSK12Div");hideLayer("campusUSK12Div");hideLayer("institutionUSK12Div");
hideLayer("buttonDivUS");hideLayer("buttonDivCA");hideLayer("buttonDivK12");
selectFirst("stateCAIdSelect");
selectFirst("stateUSK12IdSelect");
if($('stateUSAIdSelect').value == '') {clearAJAXTimer();hideLayer("institutionUSADiv"); return; }
getData(buildParms('INSTITUTESUS', 'US', 'stateProvinceId='+$('stateUSAIdSelect').value)) ;
}
function onStateCASelect() {
hideLayer("errorDiv");hideLayer("programCADiv");hideLayer("campusCADiv");showLayer("institutionCADiv");addLoadingOption("institutionCA");
hideLayer("programUSADiv");hideLayer("campusUSADiv");hideLayer("institutionUSADiv");
hideLayer("programUSK12Div");hideLayer("campusUSK12Div");hideLayer("institutionUSK12Div");
hideLayer("buttonDivUS");hideLayer("buttonDivCA");hideLayer("buttonDivK12");
selectFirst("stateUSAIdSelect");
selectFirst("stateUSK12IdSelect");
if($('stateCAIdSelect').value == '') {clearAJAXTimer();hideLayer("institutionCADiv"); return; }
getData(buildParms('INSTITUTESCA', 'CA', 'stateProvinceId='+$('stateCAIdSelect').value)) ;
}
function onStateUSK12Select() {
hideLayer("errorDiv");hideLayer("programUSK12Div");hideLayer("campusUSK12Div");showLayer("institutionUSK12Div");addLoadingOption("institutionUSK12");
hideLayer("programUSADiv");hideLayer("campusUSADiv");hideLayer("institutionUSADiv");
hideLayer("programCADiv");hideLayer("campusCADiv");hideLayer("institutionCADiv");
hideLayer("buttonDivUS");hideLayer("buttonDivCA");hideLayer("buttonDivK12");
selectFirst("stateUSAIdSelect");
selectFirst("stateCAIdSelect");
if($('stateUSK12IdSelect').value == '') {clearAJAXTimer();hideLayer("institutionUSK12Div"); return; }
getData(buildParms('INSTITUTESK12', 'K12', 'stateProvinceId='+$('stateUSK12IdSelect').value)) ;
}
//End State
//Start Institute
function onInstituteUSASelect() {
hideLayer("errorDiv"); hideLayer("programUSADiv");hideLayer('campusUSADiv');hideLayer('buttonDivUS');
hideLayer("programCADiv");hideLayer("campusCADiv");hideLayer("institutionCADiv");
hideLayer("programUSK12Div");hideLayer("campusUSK12Div");hideLayer("institutionUSK12Div");
selectFirst("stateCAIdSelect");
selectFirst("stateUSK12IdSelect");
if($('institutionUSAIdSelect').value == '') {clearAJAXTimer();hideLayer("campusUSADiv"); return; }
getData(buildParms('CAMPUSUS','US', 'institutionId='+$('institutionUSAIdSelect').value));
}
function onInstituteCASelect() {
hideLayer("errorDiv");
hideLayer("programUSADiv");hideLayer("campusUSADiv");hideLayer("institutionUSADiv");
hideLayer("programCADiv");hideLayer("campusCADiv");
hideLayer("programUSK12Div");hideLayer("campusUSK12Div");hideLayer("institutionUSK12Div");
selectFirst("stateUSAIdSelect");
selectFirst("stateUSK12IdSelect");
if($('institutionCAIdSelect').value == '') {clearAJAXTimer();hideLayer("campusCADiv"); return; }
getData(buildParms('CAMPUSCA','CA','institutionId='+$('institutionCAIdSelect').value));
}
function onInstituteUSK12Select() {
hideLayer("errorDiv");hideLayer("programUSADiv");hideLayer('campusK12Div');hideLayer('buttonDivK12');
hideLayer("programUSADiv");hideLayer("campusUSADiv");hideLayer("institutionUSADiv");
hideLayer("programCADiv");hideLayer("campusCADiv");hideLayer("institutionCADiv");
selectFirst("stateUSAIdSelect");
selectFirst("stateCAIdSelect");
if($('institutionUSK12IdSelect').value == '') {clearAJAXTimer();hideLayer("campusUSK12Div"); return; }
getData(buildParms('CAMPUSK12','K12','institutionId='+$('institutionUSK12IdSelect').value));
}
// End of Institutions
// Start Campus
function onCampusSelect_USA() {
if($('campusUSAIdSelect').value == ''){clearAJAXTimer();hideLayer("programUSADiv"); hideLayer("errorDiv"); hideLayer("buttonDivUS"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
getData(buildParms('PROGRAMSUS','US','campusId='+$('campusUSAIdSelect').value + "&institutionId=" + $('institutionUSAIdSelect').value));
}
function onCampusSelect_CA() {
if($('campusCAIdSelect').value == ''){clearAJAXTimer();hideLayer("programCADiv"); hideLayer("errorDiv"); hideLayer("buttonDivCA"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
getData(buildParms('PROGRAMSCA','CA', 'campusId='+$('campusCAIdSelect').value + "&institutionId=" + $('institutionCAIdSelect').value));
}
function onCampusSelect_USK12() {
if($('campusUSK12IdSelect').value == ''){clearAJAXTimer();hideLayer("programUSK12Div"); hideLayer("errorDiv"); hideLayer("buttonDivK12"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
getData(buildParms('PROGRAMSK12','K12', 'campusId='+$('campusUSK12IdSelect').value + "&institutionId=" + $('institutionUSK12IdSelect').value));
}
// End of Campus
// Program Select
function onProgramSelect_USA() {
if($('programUSAIdSelect').value == ''){clearAJAXTimer();hideLayer("buttonDivUS"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
doForward($("programUSAIdSelect").value, null, 'buttonDivUS');
}
function onProgramSelect_CA() {
if($('programCAIdSelect').value == ''){clearAJAXTimer(); hideLayer("buttonDivCA"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
doForward($("programCAIdSelect").value, null,'buttonDivCA');
}
function onProgramSelect_USK12() {
if($('programUSK12IdSelect').value == ''){clearAJAXTimer();hideLayer("buttonDivK12"); return; }
// REMOVE THIS LATER
clearAJAXTimer();
doForward($("programUSK12IdSelect").value, null, 'buttonDivK12');
}
// End of Program Select.
// Loading Drop downs starts
function loadSTATESUS(data, meta) {
hideLayer("buttonDivUS");
hideLayer("buttonDivCA");
hideLayer("buttonDivK12");
addOptions("stateUSA", data, meta, "stateUSAIdSelect");
}
function loadSTATESCA(data, meta) {
hideLayer("buttonDivUS");
hideLayer("buttonDivCA");
hideLayer("buttonDivK12");
addOptions("stateCA", data, meta, "stateCAIdSelect");
}
function loadSTATESK12(data, meta) {
hideLayer("buttonDivUS");
hideLayer("buttonDivCA");
hideLayer("buttonDivK12");
addOptions("stateUSK12", data, meta, "stateUSK12IdSelect");
}
function loadINSTITUTESUS(data, meta) {
最佳答案
您可以使用原型(prototype)和选择的 id 来获取选择。
$('stateUSAIdSelect');
或者带有 css 规则的选项
$$('#stateUSAIdSelect option');
您实际上想用它们做什么?
更新:
抱歉,我误解了我想的问题。您想弄清楚如何使用 htmlunit 测试这些元素?
要获取选择,您可以使用getHtmlElementById
page.getHtmlElementById("stateUSAIdSelect");
从那里您可以调用 getChildNodes
从选择中获取所有选项。
htmlunit 的 javadoc 概述了您也应该能够使用的一大堆其他方法 http://htmlunit.sourceforge.net/apidocs/index.html .
希望有帮助。
关于javascript - 如果 DOM 中没有表单,如何获取选择/选项列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2157361/
我需要您在以下方面提供帮助。近一个月来,我一直在阅读有关任务和异步的内容。 我想尝试在一个简单的 wep api 项目中实现我新获得的知识。我有以下方法,并且它们都按预期工作: public Htt
我的可执行 jar 中有一个模板文件 (.xls)。不需要在运行时我需要为这个文件创建 100 多个副本(稍后将唯一地附加)。用于获取 jar 文件中的资源 (template.xls)。我正在使用
我在查看网站的模型代码时对原型(prototype)有疑问。我知道这对 Javascript 中的继承很有用。 在这个例子中... define([], function () { "use
影响我性能的前三项操作是: 获取滚动条 获取偏移高度 Ext.getStyle 为了解释我的应用程序中发生了什么:我有一个网格,其中有一列在每个单元格中呈现网格。当我几乎对网格的内容做任何事情时,它运
我正在使用以下函数来获取 URL 参数。 function gup(name, url) { name = name.replace(/[\[]/, '\\\[').replace(/[\]]/,
我最近一直在使用 sysctl 来做很多事情,现在我使用 HW_MACHINE_ARCH 变量。我正在使用以下代码。请注意,当我尝试获取其他变量 HW_MACHINE 时,此代码可以完美运行。我还认为
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 关闭 9 年前。 要求提供代码的问题必须表现出对所解决问题的最低限度的理解。包括尝试过的解决方案、为什么
由于使用 main-bower-files 作为使用 Gulp 的编译任务的一部分,我无法使用 node_modules 中的 webpack 来require 模块code> dir 因为我会弄乱当
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 5 年前。 Improve this qu
我使用 Gridlayout 在一行中放置 4 个元素。首先,我有一个 JPanel,一切正常。对于行数变大并且我必须能够向下滚动的情况,我对其进行了一些更改。现在我的 JPanel 上添加了一个 J
由于以下原因,我想将 VolumeId 的值保存在变量中: #!/usr/bin/env python import boto3 import json import argparse import
我正在将 MSAL 版本 1.x 更新为 MSAL-browser 的 Angular 。所以我正在尝试从版本 1.x 迁移到 2.X.I 能够成功替换代码并且工作正常。但是我遇到了 acquireT
我知道有很多关于此的问题,例如 Getting daily averages with pandas和 How get monthly mean in pandas using groupby但我遇到
This is the query string that I am receiving in URL. Output url: /demo/analysis/test?startDate=Sat+
我正在尝试使用 javascript 中的以下代码访问 Geoserver 层 var gkvrtWmsSource =new ol.source.ImageWMS({ u
API 需要一个包含授权代码的 header 。这就是我到目前为止所拥有的: var fullUrl = 'https://api.ecobee.com/1/thermostat?json=\{"s
如何获取文件中的最后一个字符,如果是某个字符,则删除它而不将整个文件加载到内存中? 这就是我目前所拥有的。 using (var fileStream = new FileStream("file.t
我是这个社区的新手,想出了我的第一个问题。 我正在使用 JSP,我成功地创建了 JSP-Sites,它正在使用jsp:setParameter 和 jsp:getParameter 具有单个字符串。
在回答 StoreStore reordering happens when compiling C++ for x86 @Peter Cordes 写过 For Acquire/Release se
我有一个函数,我们将其命名为 X1,它返回变量 Y。该函数在操作 .on("focusout", X1) 中使用。如何获取变量Y?执行.on后X1的结果? 最佳答案 您可以更改 Y 的范围以使其位于函
我是一名优秀的程序员,十分优秀!