2011-04-05 42 views

回答

0

如果您的意圖是在將數據提交給服務器之前驗證HTML表單中的數據,則需要使用javascript。表單驗證Powershell沒有任何意義。例如,您可以獲得的唯一驗證是用戶輸入,但與表單提交無關。

+0

$ ie.Document.getElementById(「institution」)。value =「ULB」; $ ie.Document.getElementById(「category」)。value =「1」; $ ie.Document.getElementById(「rollnumber」)。value = $ matricule; $ ie.Document.getElementById(「birth_day」)。value = $ date1; $ ie.Document.getElementById(「birth_month」)。value = $ date2; $ ie.Document.getElementById(「birth_year」)。value = $ date3; #點擊提交按鈕 $ ie.Document.getElementById(「Continue」)。Click(); 但最後一行不起作用 – user693612 2011-04-06 08:04:57

+0

您能澄清您正在使用哪種語言嗎?它似乎是PowerShell和JavaScript之間的混合...你爲什麼使用';'?你如何獲得'$ ie'? – 2011-04-06 11:11:20

+0

我使用powershell – user693612 2011-04-06 12:40:02