0
我有個PHP數組:傳遞PHP變量
foreach($xpath->query('//a') as $element) {
$linklabel[] = $element->textContent;
$link[] = $element->getAttribute("href");
$i=$i+1;
}
我也有一個HTML形式:
<form name="keypad" id="form" onSubmit="return pass(this)">
<input type="text" size="100%" length="25" value="" name="lcd">
<input type="button" value=" 1 " name="one" onClick="this.form.lcd.value+=this.value">
<input type="button" value=" 2 " name="two" onClick="this.form.lcd.value+=this.value">
<input type="button" value=" 0 " name="zero" onClick="this.form.lcd.value+=this.value">
<input type="submit" name="Submit" id="Submit" value="Go" >
</form>
如何可以寫出的onSubmit功能pass()
從鍵盤所採用的值,併發送對應的$link[]
值爲browse.php。例如,如果$link[20]='google.com';
,我想通過$link[20]
到browse.php如果用戶在鍵盤20
和印刷機去
thanku你邁克爾..讓我試試這個... – 2010-07-07 22:02:15
錯誤heppening當我試圖使用「爲($鏈接爲$鏈接)....是因爲我的代碼問題,我是一個初學者在php – 2010-07-07 22:05:57
可以任何機構建議一個更好的主意。**回聲**的想法是破壞我的網頁與鏈接 – 2010-07-07 22:31:26