編輯:我已經找到了如何發佈標題,並且知道如何獲取值,但需要幫助才能做到。就這個。如何獲取lua中html div的全部內容
- 我必須檢索網頁。 (這部分是確定的)
- 找出結果「formulaire_action_args」出現在哪行並保存在一個變量中。 (尋找一個比循環更好的方式)
- 並從這一行檢索屬性「value」。
我試圖讓包含在一個div像這樣一個HTML頁面的內容:
<form id="formulaire_login" method="post" action="/spip.php?page=login&lang=fr" enctype="multipart/form-data">
<div>
<input name="page" value="login" type="hidden">
<input name="lang" value="fr" type="hidden">
<input name="formulaire_action" type="hidden" value="login">
<input name="formulaire_action_args" type="hidden" value="random_value">
</div>
<fieldset>
<ul>
<li class="editer_login obligatoire">
<input type="text" class="text" name="var_login" id="var_login" value="" size="40">
</li>
<li class="editer_password obligatoire">
<input type="password" class="password" name="password" id="password" value="" size="40">
</li>
</ul>
</fieldset>
</form>
我想使用id =「formulaire_login」形式的內容和這種形式中得到輸入
<input name="formulaire_action_args" type="hidden" value="random_value">
和在第二隻手的屬性「值」(random_value)的值,我尋找一種方法以請求與POST的報頭數據的URL。
問題是非常不清楚;你想提取''元素?或者你想解析表單的匹配POST請求? – daurnimator
我是triyng獲取特定值 – ThePH