A simple printer printing method is introduced.

Source: Internet
Author: User

The printer printing function has been implemented in the project recently. Although it is very simple, it is analyzed as follows:

<Div class = "controltitle"> current operation: information Management --> Student Information list --> printing of Student Information </div> <SPAN class = "content_button_a_left" onclick = "printdiv ('div _ print '); "> Print </span> <Div id =" div_print "> <Table class =" tablefirst "id =" radiosub "> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col s Tyle = "width: 5%"/> <Col style = "width: 5%"/> <Col style = "width: 5%"/> <Col style = "width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <Col style =" width: 5% "/> <tr> <TH> Student ID </Th> <TH> name </Th> <TH> gender </Th> <TH> major </Th> <th> Educational System </Th> <TH> admission year </Th> <TH> graduation year </Th> <TH> province and city </Th> <TH> Work Unit </Th> <TH> position </Th> <TH> title </Th> <TH> office phone number </Th> <TH> mobile phone number </Th> <TH> QQ </Th> <TH> email address </Th> <TH> Communication Address </Th> <TH> Home address </Th> </tr> <# If inforlist? Exists> <# list inforlist as infor> <tr> <TD >$ {infor. stunum} </TD> <TD >$ {infor. stuname} </TD> <TD >$ {infor. stusex} </TD> <TD >$ {infor. stuzy} </TD> <TD >$ {infor. stuxz} </TD> <TD >$ {infor. stustarttime }</TD> <TD >$ {infor. stuendtime }</TD> <TD >$ {infor. stuworkaddress }</TD> <TD >$ {infor. stuworkplace }</TD> <TD >$ {infor. stuworkpost} </TD> <TD >$ {infor. stuworkzc }</TD> <TD >$ {infor. stuphone} </TD> <TD >$ {infor. stutelephone }</TD> <TD >$ {infor. stuqq} </TD> <TD >$ {infor. stuemail} </TD> <TD >$ {infor. stucommaddress }</TD> <TD >$ {infor. stuaddress} </TD> </tr> </# list> </# If> </table> </div> <Div class = "shadehiddenblock" id = "subdetail" style = "dispaly: none; "> </div> <SCRIPT> function printdiv (printpage) {var headstr = "<HTML> 

In fact, the print operation is to call a piece of JS Code to print the content in a specific Div. This method is very simple.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.