1. The internal link is in the form of setting the href attribute value to # + id in the <a> label, while the external link adds the rel attribute in <a>, set the property value to external, for example, <a href = "about.html" rel = "external"> 3i Studio </a>
2. Sample Code for external link Switching:
Copy codeThe Code is as follows:
<! Doctype html>
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<Meta name = "viewport" content = "width = device-width, initial-scale = 1"/>
<Link href = "Css/jquery.mobile-1.2.0.min.css" rel = "Stylesheet" type = "text/css"/>
<Script src = "Js/jquery-1.8.3.min.js" type "text/javascript"> </script>
<Script src = "Js/jquery. mobile-1.2.0.min.js" type = "text/javascript"> </script>
</HEAD>
<BODY>
<Section id = "page1" data-role = "page">
<Header data-role = "header"> <Div data-role = "content" class = "content">
<P> <a href = "# w1"> today </a> </p> |
<P> <a href = "#"> tomorrow </a> </p>
</Div>
<Footer data-role = "footer"> </Section>
<Section id = "w1" data-role = "page" data-add-back-btn = "true">
<Header data-role = "header"> <Div data-role = "content" class = "content">
<P> 4 ~ 7'c <br/> Sunny to cloudy <br/> breeze </p>
<Em style = "float: right; padding: 5px">
<A href = "about.html" rel = "external"> 3i Studio </a> provides
</Em>
</Div>
<Footer data-role = "footer"> </Section>
</BODY>
</HTML>
External file about.html code:
Copy codeThe Code is as follows:
<! Doctype html>
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<Meta name = "viewport" content = "width = device-width, initial-scale = 1"/>
<Link href = "Css/jquery.mobile-1.2.0.min.css" rel = "Stylesheet" type = "text/css"/>
<Script src = "Js/jquery-1.8.3.min.js" type "text/javascript"> </script>
<Script src = "Js/jquery. mobile-1.2.0.min.js" type = "text/javascript"> </script>
</HEAD>
<BODY>
<Section id = "page1" data-role = "page" data-add-back-btn = "true">
<Header data-role = "header"> <Div data-role = "content" class = "content">
<P> 3I Studio is a technical team dedicated to entrepreneurial innovation </p> |
</Div>
<Footer data-role = "footer"> </Section>
</BODY>
</HTML>
3. Preview:
Click 3i Studio for external links:
4. If the previous page is returned, add the data-rel attribute to the <a> label and set the attribute to back, for example: <a data-rel = "back"> return to the previous page </a>