我需要html中變量的幫助。 我的應用程序獲取SQL請求並將它們發送給Oracle,並從數據庫向用戶返回請求的數據。在發送請求之前,用戶必須選擇開始日期和結束日期。數據由ajax顯示,我在一個「index.php」中有很多這樣的SQL。試想一下,一個文檔與10個SQL查詢和處理日期的地方如下:HTML中的變量
//Dates box
<div class="date_boxes">
<div class="control-group">
<strong>Start Date:</strong>
<input type="text" value="choose the start date" id="startDate" name="startDate" class="startDate"
onfocus="if (this.value == 'choose the start date') {this.value = '';}"
onblur="if (this.value == '') {this.value = 'choose the start date'; }"/>
</div>
<div class="control-group">
<strong>End Date:</strong>
<input type="text" value="choose the end date" id="endDate" name="endDate" class="endDate"
onfocus="if (this.value == 'choose the end date') {this.value = '';}"
onblur="if (this.value == '') {this.value = 'choose the end date'; }"/>
</div>
</div>
他們每個人都是一樣的,但不同的ID。我怎樣才能把這個變量放到這個代碼中。我可以使用PHP變量,或者這應該在JavaScript中?你有什麼例子嗎?
謝謝你的任何建議。
也許,我解釋了這個問題不是很清楚。我需要做這樣的事情,但我不確定有身份證可以做到這一點。 > or 或者我需要編寫函數,每次在SQL中需要選擇數據時,函數將調用帶有所需id的數據框。 但我相信,我不需要使用SQL。 如果您有人有任何示例,我該如何進行注射。 –
你不能使用這個 –