我正在使用JavaScript函數提交我的表單。這適用於每一個瀏覽器除了Safari和我想不通爲什麼document.form.submit();將不會在Safari中提交
我的JavaScript函數看起來像這樣
function submitForm() {
var selectBox = '';
sel_guide_options = document.subForm.sel_guides;
if (sel_guide_options.type == "select-multiple") {
for (var i = 0; i <sel_guide_options.options.length; i++) {
sel_guide_options.options[i].selected = true;
}
}
document.subForm.submit();
}
,並在我的形式,我用這個
<input type="submit" name="btnSubmit" value="#modification_type# #page_item#" id="btnSubmit" onclick="submitForm();">
可能重複的[Firefox處理xxx.submit(),Safari不...可以做什麼?](http://stackoverflow.com/questions/333329/firefox-handles-xxx-submit-safari -doesnt-what-can-done) – 2011-04-28 16:26:53
http://stackoverflow.com/questions/333329/firefox-handles-xxx-submit-safari-doesnt-what-can-be-done – 2011-04-28 16:27:03