Javascript 如何让iPhone大小的网页显示正确的大小?

Javascript 如何让iPhone大小的网页显示正确的大小?,javascript,css,iphone,mobile-safari,Javascript,Css,Iphone,Mobile Safari,我正在为一个网站创建几个页面的iphone版本,并使用javascript文件重定向到正确的页面: <script type="text/javascript">// <![CDATA[ if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) location.replace("index2.html"); // ]]></script> // 加

我正在为一个网站创建几个页面的iphone版本,并使用javascript文件重定向到正确的页面:

<script type="text/javascript">// <![CDATA[
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
location.replace("index2.html");
// ]]></script>
//
加载很好,但在屏幕上很小

我需要做什么才能让它填满iPhone的屏幕

以下是html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="Advantage Total Agency Management" />
<meta name="keywords" content="Advantage" />
<meta name="author" content="Advantage" />

<link rel="stylesheet" type="text/css" media="screen" href="_css/mobile.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<title>Mobile Home | Go To Advantage</title>
</head>
<body id="home">
<div id="header">
    <a href="/"><img src="_images/logo.png" alt="Advantage Software" /></a>
    <ul>
        <li><a class="home" href="index.html">home</a></li>
        <li><a class="services" href="services.html">services</a></li>
        <li><a class="contact" href="contact.html">contact</a></li>
    </ul>
</div>
<div id="intro">
    <img src="_images/quote.png" alt="We work the way you work" />
    <p>Advantage is integrated software for Advertising, Marketing, Public Relations, Media Buying and related organizations that is robust, flexible, browser-based, and mobile.</p>
</div>
<div id="text">
    <p>Our software products meet the needs of mid to large-size agencies but also smaller agencies with a streamlined and efficient design. Our role-based methodology ensures that every individual in the agency benefits from the software. Our Advantage suite of agency software products streamline agency workflow and internal processes.</p>
</div>
<div id="footer">
    <ul>
        <li><a class="call">call</a></li>
        <li><a class="email">email</a></li>
        <li><a class="demo">demo</a></li>
    </ul>
</div>
</body>
</html>

移动家庭|走向优势
Advantage是用于广告、营销、公共关系、媒体购买和相关组织的集成软件,功能强大、灵活、基于浏览器且可移动

我们的软件产品以流线型和高效的设计满足中大型机构以及小型机构的需求。我们基于角色的方法确保机构中的每个人都能从软件中受益。我们的Advantage套装代理软件产品简化了代理工作流程和内部流程

  • 召唤
  • 电子邮件
  • 演示

请参见

使用视口元标记在屏幕内“缩放”页面:

或使用“设备宽度”指定屏幕宽度。您还可以通过在meta标记中添加
user scalable=no“
来禁用用户控制的缩放