0
我真的需要一些幫助:(
我有一個問題在IE瀏覽器(7-8-9),我無法執行提交,它在Chrome上完美工作如果你點擊輸入,顯示爲鏈接樣式,在IE上什麼也沒有發生,我也嘗試過使用這個技巧來執行提交形式沒有動作和方法領域,但沒有任何反應,它從來沒有真正「火」提交IE不執行一個表單,帶有一個servlet和一個複雜的輸入提交
輸入提交我使用的是:
<span style="color:#355D8A;">
<!--SUBMIT-->
<input onMouseOut="this.style.textDecoration='none'; this.style.cursor='auto'" style="background-color:transparent;color:#355D8A;
width:120px; margin-left:0px;" onMouseOver="this.style.textDecoration='underline'; this.style.cursor='pointer'"
type="submit" style="background-color:transparent;" name="cancel1" value="Cancel something"
id="cancel1" /></span >
和形式是:
<form action="some_servlet_call" method="post" name="form_name" id="form_id">
如果你需要看到更多的代碼在這裏有:
[...]
<body>
<form action="some_servlet_call" method="post" name="form_name" id="form_id">
<!-- PAGINA -->
<input type="hidden" name="pagina" value="pagina_value" id="pagina" />
[...]
<!--COUNTER-->
<input type="hidden" name="contatore" value="2" id="contatore" />
<!--CODE-->
<input type="hidden" name="code_value1" value="code_value" id="code_value1" />
[...]
<!--CODICE-->
<input type="hidden" name="codice1" id="codice1" value="2" />
[...]
<table width="100%" align="center" >
<tr >
<td>
<!-- SELECT -->
<select id="select1" class="class_example" onChange="myUpdateSelect(1);">
<option id="1option1" selected="selected">Option1</option>
<option id="2option1">Option2</option>
<option id="3option1">Option3</option>
<option id="4option1">Option4</option>
</select>
<!--SELECT ASSOCIATED INPUT-->
<input name="selectHidden1" id="selectHidden1" type="hidden" value="Option1" />
</td>
<td>
<!--EMAIL-->
<input id="email1" class="email_input_class" type="text" name="email1"
onblur="if (this.value == '') {this.value = '[email protected]';}" style="width:190px;"
onfocus="if (this.value == '[email protected]') {this.value = '';}" value="[email protected]" />
</td>
[...]
<td>
<span style="color:#355D8A;">
<!--SUBMIT-->
<input onMouseOut="this.style.textDecoration='none'; this.style.cursor='auto'" style="background-color:transparent;color:#355D8A;
width:120px; margin-left:0px;" onMouseOver="this.style.textDecoration='underline'; this.style.cursor='pointer'"
type="submit" style="background-color:transparent;" name="cancel1" value="Cancel something"
id="cancel1" /></span >
</td>
[...]
JavaScript函數是:
function myUpdateSelect(counter){
var selectId = "select"+counter;
var selectHiddenId = "selectHidden"+counter;
var selectChanged = document.getElementById(selectId);
var selectHiddenChanged = document.getElementById(selectHiddenId);
var idOption = selectChanged.options[selectChanged.selectedIndex].id;
var selectedOption = document.getElementById(idOption);
for(var i=0;i<selectChanged.options.length;i++){
selectChanged.options[i].selected = false;
}
selectedOption.selected = true;
selectHiddenChanged.value = selectedOption.value;
}
對不起,我不要不明白如何格式化代碼在這裏作爲html ...