Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript iphone web表单验证_Javascript_Iphone_Validation - Fatal编程技术网

Javascript iphone web表单验证

Javascript iphone web表单验证,javascript,iphone,validation,Javascript,Iphone,Validation,我有一个专用iphone登录页的表格。但是找不到任何可以处理验证的东西。我只需要验证号码,但名称也可能有用。我似乎找不到任何会提醒用户尚未输入字段的内容 这只是iphone,是一个web表单,不是应用程序 <form method="post" action="submitquote.php" name="quoteform"> <label>Your Full Name</label> <input style="outline:none;" id="

我有一个专用iphone登录页的表格。但是找不到任何可以处理验证的东西。我只需要验证号码,但名称也可能有用。我似乎找不到任何会提醒用户尚未输入字段的内容

这只是iphone,是一个web表单,不是应用程序

<form method="post" action="submitquote.php" name="quoteform">
<label>Your Full Name</label>
<input style="outline:none;" id="name" type="text" name="name" size="20" value="" class="elements"/>
<label>Your Email Address</label>
<input style="outline:none;" id="email" type="email" name="email" size="20" value="" class="elements"/>
<label>Your Telephone Number</label>
<input style="outline:none;" id="telephone" type="text" pattern="[0-9]*" name="telephone" size="20" value="" class="elements">            
<label>Company Postcode</label>
<input style="outline:none;" id="postcode" type="text" name="postcode" size="20" value="" class="input" /> 

<div class="saveon">Save on..</div>

<div class="checkboxs">Gas<input type="hidden" name="gasresult" value="no" /><input name="gasresult" type="checkbox" value="yes" checked="checked" /> Electricity<input type="hidden" name="electricresult" value="no" /><input name="electricresult" type="checkbox" value="yes" checked="checked" /></div>
<input type="hidden" value="<?php echo $myid ?>" name="track" />
<input type="hidden" value="<?php echo $_GET['utm_source']; ?>" name="utm_source" />
<input type="hidden" value="<?php echo $_GET['utm_medium']; ?>" name="utm_medium" />
<input type="hidden" value="<?php echo $_GET['utm_term']; ?>" name="utm_term" />
<input type="hidden" value="<?php echo $_GET['utm_content']; ?>" name="utm_content" />
<input type="hidden" value="<?php echo $_GET['utm_campaign']; ?>" name="utm_campaign" />
<input type="submit" value="" class="submit" onclick="pageTracker._trackPageview('/HomePage/ClassicQuoteRequest/Submit')" />

</form>

你的全名
你的电子邮件地址
你的电话号码
公司邮政编码
节省。。
煤气电

可以使用JavaScript获取表单的输入对象的值

function nameOK() {
    var myForm = document.quoteform; // document.#nameOfForm#
    var input = myForm.name;
    var content = input.value;
    return (content != "");
}
这是未经测试,但我最近做了一些类似的存储饼干

希望它能起作用,
ief2