2013年12月16日星期一

Questions about the submission form

 This post last edited by the u012903796 on 2013-12-17 10:38:11
jsp page, there is a picture ( or words ) , when clicked will send the request , but not in the form of text or picture form, should be how to achieve ?
------ Solution ---------------------------------------- ----
by js to control , to form links or pictures together outside the click event .
For example:
jquery wording

$(function(){
$('img').click(function(e){
$('form')[0].submit();
});
});

plain wording js

window.onload = function() {
document.getElementByTag('img').click = function(e){
form.submit();
};
}

------ Solution ------------------------------------- -------

action can be written on the form , you can also js assignment:
form.action = " your url address" ;
form.submit ();


------ For reference only ---------------------------------- -----
request sent by js control what action the request is it ?
------ For reference only -------------------------------------- -
form hidden inside put pictures and text information, and then submit to the background together .

没有评论:

发表评论