Page coverage during form submission
When submitting a form, the operator only needs to wait for the result to return. Here, I implemented a method to overwrite the webpage so that the entire webpage is overwritten by a large Div, in this way, the operator cannot click the content on the page. Implementation is simple, a div
<Div id = "doing" style = "Z-INDEX: 12000; left: 0px; width: 100%; cursor: Wait; position: absolute; top: 0px; Height: 100%; display: none ">
<Table width = "100%" Height = "100%">
<Tr align = "center" valign = "Middle">
<TD>
<Table width = "169" Height = "62" bgcolor = "#99 CCCC" style = "filter: alpha (opacity = 75); width: 169px; Height: 62px">
<Tr align = "center" valign = "Middle">
<TD> the page is being submitted. <br>
Loading. </TD>
</Tr>
</Table>
</TD>
</Tr>
</Table>
</Div>
The page is hidden when it is initially loaded and displayed when the submit button is pressed. After the result is returned, hide it again. JSPCode :
<%
String content = request. getparameter ("Tc ");
If (content = NULL ){
%>
<Form action = "#" method = "Post" onsubmit = "return show ()">
<Textarea name = "Tc"> dfdfsdf
Dfdaf </textarea>
<Input type = submit value = "go">
</Form>
<%
}
Else {
If (content. indexof ("/N") =-1)
Out. println ("Haha ");
// Content = content. replaceall ("/N", "<br> ");
%>
<Textarea> <% Out. println (content); %>
</Textarea>
<%
}
%>
Show method:
Function show (){
Document. getelementbyid ('doing'). style. Display =''
Return true;
}
When the form is submitted and the result is returned, the page is reloaded, and the display attribute of div is automatically set to none. Achieve the desired effect. |
Div overwrite the Asp.net page
|
<Script language = "JavaScript">
Function fgoto ()
{
VaR W = Window. Screen. availwidth-100;
VaR H = self-service. Screen. availheight-200;
VaR doc=window.doc ument;
VaR DIV = Doc. createelement ("Div ");
VaR info = "<Table border = 1 style = width:" + W + "; Height:" + H + "; Background-color: red; filter: alpha (opacity = 30)> <tr> <TD align =/"center/"> <input type = button value = return onclick = javascript: document. getelementsbytagname ('body') [0]. removechild (showerr);> </TD> </tr> </table>"
Div. ID = 'showerr ';
Div. style. Position = 'absolute ';
Div. style. z_index = 100;
Div. style. width = 900;
Div. style. Left = 0;
Div. style. Top = 0;
Div. innerhtml = Info;
Doc. getelementsbytagname ("body") [0]. appendchild (DIV );
}
</SCRIPT>
<HTML>
<Body>
</Body>
</Html>
|