1
Solve with the problem of positioning
var oheight = $ (document). Height (); Browser's current height
$ (window). Resize (function () {
if ($ (document). Height () < oheight) {
$ ("#footer"). CSS ("position", "static");
}else{
$ ("#footer"). CSS ("position", "absolute");
}
});
2 The second method is to change the height of the area.
var loaclheight = $ ("section"). Height ();//Get visual width
$ ("Input,textarea"). focus (function () {
var keyboardheight = localheight-$ ("section"). Height ();//Gets the height of the keyboard
var keyboardy = localheight-keyboardheight;
var addbottom = (parseint (this). Position (). Top) + parseint ($ (this). Height ()));//Bottom of text field
var offset = addbottom-keyboardy;//Calculates the distance of the upper slide
$ ("section"). scrolltop (offset);
});
On the phone, click on the input box soft keyboard appears when the input box is not overwritten, displayed in the middle of the screen