Original: http://www.open-open.com/code/view/1449843459332
On many mobile websites, there is the function of calling and texting, how to realize these functions. It's not hard, but today we use HTML5 to achieve them. It's easy to make you eye-opener.
HTML5 is easy to write, but when you create a Web page, you often need to repeat the same tasks, such as creating a form. In this ... With HTML5 start-up templates, blank images, phone calls and text messages, auto-completion, and more, they help you improve your development efficiency while also bringing a more dazzling feature. OK, let's do a look at the effect today!!
Look at the code:
<!DOCTYPE HTML> <HTML> <Head> <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"> <title>Pseudo expert HTML5 Development method SMS function</title> <Metaname= "Viewport"content= "Width=device-width, initial-scale=1.0"> <Linkrel= "stylesheet"href= "Http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"> <Scriptsrc= "Http://code.jquery.com/jquery-1.8.3.min.js"></Script> <Scriptsrc= "Http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></Script> </Head> <Body> <DivData-role= "page"> <DivData-role= "header"data-position= "fixed"> <H1>Pseudo expert HTML5 development call, send SMS function</H1> </Div> <DivData-role= "Content"> <P><ahref= "sms:10086?body= SMS Content"Data-role= "button"Data-theme= "a">Test Send SMS</a></P> <P><ahref= "tel:10086"Data-role= "button"Data-theme= "a">Test call</a></P> </Div> <DivData-role= "Footer"data-position= "fixed"> <H1>Pseudo expert HTML5 development call, send SMS function</H1> </Div> </Div> </Body> </HTML>
HTML5 Development mobile phone call texting function