HTML 코드에 문제가 있습니다. HTML 코드에서 XML 문서를 탐색하려고합니다.DOM HTML에서 XML 문서를 어떻게 트래버스 할 수 있습니까?
<?xml version = "1.0"?>
<planner>
<year value = "2000">
<date month = "7" day = "15">
<note time = "1430">Doctor's appointment</note>
<note time = "1620">Physics class at BH291C</note>
</date>
<date month = "7" day = "4">
<note>Independence Day</note>
</date>
<date month = "7" day = "20">
<note time = "0900">General Meeting in room 32-A</note>
</date>
<date month = "7" day = "20">
<note time = "1900">Party at Joe's</note>
</date>
<date month = "7" day = "20">
<note time = "1300">Financial Meeting in room 14-C</note>
</date>
</year>
</planner>
이 HTML 코드
<!DOCTYPE>
<html>
<Head>
<title>Day Planner</title>
<script src="plan.xml"></script>
</head>
<body>
<form method = "post" action = "">
<p>year : </p>
<select id="SelectYear">
<option selected= "selected">Select Year</option>
<option>2000</option>
</select>
<p>Month : </p>
<select id="Month">
<option selected= "selected">Select Month</option>
<option>7</option>
</select>
<p>Day : </p>
<select id="Day">
<option selected= "selected">Select Day</option>
<option>4</option>
<option>15</option>
<option>20</option>
</select>
<p>Time : </p>
<select id="SelectTime">
<option selected= "selected">Select Time</option>
<option>0900</option>
<option>1300</option>
<option>1430</option>
<option>1620</option>
<option>1900</option>
</select>
</br>
</br>
<input type = "submit" value = "Submit" />
<input type = "reset" value = "Reset" />
<p><label>your task is : <br />
</p>
</form>
</body>
</html>
어떻게 작동 얻을 수 있습니다
이것은 XML 코드는?
내가 동일한 세부 사항을 html로 선택하면 동일한 작업을 동일한 날에 어떻게 할 수 있습니까?
이 확실히 당신을 도울 것입니다 : 당신이 다음을 수행하여 웹 페이지에 넣을 수 있도록
이 문서를 구문 분석 할 수 http://api.jquery.com/jQuery.parseXML/ –
JQuery를 사용할 기술이 없습니다 – user3123342
@ user3123342 프로젝트에서 jQuery를 사용할 수 없거나 익숙하지 않으므로 사용하지 않을 수 있습니까? 당신은 어떤 종류의 자바 스크립트를 사용해야 할 것입니다, 당신은 당신이 jQuery를 사용한다면 더 쉽게 만들 수 있습니다. – Danny