這是我在網頁代碼HTML1,從HTML如何通過字段集內容的HTML
<fieldset id="bill1">
<div style="font-size:9px" id="serviced"><b>Service :</b></div>
<div style="font-size:9px" id="tratyped"><b>Type of Transport :</b></div>
<div style="font-size:9px" id="custyped"><b>Type of Client</b></div>
<div style="font-size:9px" id="datepickerd"><b>Date :</b></div>
<div style="font-size:9px;display:none" id="timed"><b>Time :</b></div>
<div style="font-size:9px" id="departured"><b>Departure Address :</b></div>
<div style="font-size:9px" id="destinationd"><b>Arrival Address</b></div>
</fieldset>
這些div的innerHTML值將在運行時更改。
如何在另一頁html2中發送或查看這些信息。
我希望能夠將「html2」頁面中的字段集內容(包含'html2')包含在「php1」頁面中。
請幫助我編碼或只是給你的建議,我會嘗試自己編碼。
謝謝!
編輯............
內fare.html
<fieldset id="bill2" style="padding-top:0">
<div style="font-size:9px" id="passengerd"><b>No. of Passengers :</b></div>
<div style="font-size:9px" id="shairwelld"><b>No. of Chariwells :</b></div>
<div style="font-size:9px" id="babycd"><b>No. of Baby Chairs :</b></div>
<div style="font-size:9px" id="companiond"><b>No. of Companions :</b></div>
</fieldset>
在pay.html
<fieldset id="bill2">
</fieldset>
我用腦袋裏面的jQuery代碼標記爲
<script src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#bill2').load('/fare.html #bill2')
})
</script>
上述代碼wo rks ...
它加載字段集的默認內容。但是不能加載運行時產生的值。有沒有什麼辦法解決這一問題?
謝謝!
我試過了你的代碼,但html2頁面中的fieldset是空的。它沒有加載內容。我將編輯與我如何嘗試它的問題。感謝您的幫助。 –
看看更新的例子 –
它仍然沒有工作,我也雙重檢查了ID的確保我拼寫正確,但字段集沒有加載內容。我用迄今爲止的嘗試更新了這些問題。感謝您的幫助。 –