<input type=”image” value=”edit”> The VALUE attribute is passed by all browsers; except IE and Opera.
The workaround solution is using a hidden field to pass the form action:
function formAction(svalue)
{
var objAction = document.getElementById(“action”);
objAction.value = svalue;
}
//Hidden Action:
<input type=”hidden” name=”action” id=”action” value=”">
//Submit Actions:
<input type=”image” name=”submit” value=”edit” onClick=”formAction(this.value);”>
<input type=”image” name=”submit” value=”delete” onClick=”formAction(this.value);”>
<input type=”image” name=”submit” value=”update” onClick=”formAction(this.value);”>
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。