1
好吧,我們對嵌入爲iframe的配置文件具有星級評分系統,因爲它的暴露數據庫表等不安全,但即將到來。現在,我們要將評分值從1-5的iframe中的表單中的隱藏字段插入,並自動提交。我們怎樣才能做到這一點?幾個在線示例不起作用。將文本插入到iframe表單域並提交
裏面的iframe:
<form action="submit_rating.php" method="POST">
<input type="text" name="1" id="rate1" maxlength="1">
<input type="text" name="2" id="rate2" maxlength="1">
<input type="text" name="3" id="rate3" maxlength="1">
<input type="text" name="4" id="rate4" maxlength="1">
<input type="text" name="5" id="rate5" maxlength="1">
<input type="submit" value="Rate" style="display:none;" />
</form>
的iframe:
<iframe src="http://domain.com/submit_rating.php" frameborder="0" scrolling="no" height="10" width="25" name="frame"></iframe>
評級鏈接:
<a href="howtoinsert?">1</a>
<a href="howtoinsert?">2</a>
<a href="howtoinsert?">3</a>
<a href="howtoinsert?">4</a>
<a href="howtoinsert?">5</a>
謝謝。就像我說的,所有其他例子都是垃圾,並沒有工作。
現在,如果我只想插入一個自定義值, 這個怎麼做? $(幀).find( '#about_me' +等級).VAL( '1');通過示例自定義輸入名稱。謝謝 –