我正在将 phonegap 与 jquery mobile 一起使用,版本 1.3.0,最近与 jquery 验证一起推出(尝试了两个版本,1.11 和 1.9),我遇到了文本框验证的问题。问题是错误消息放在文本框中,看起来很丑。使用 jquery mobile 1.2.0 一切正常。我发现了问题,不知道如何优雅地解决它。
带有 jquery mobile 1.2.0 的代码:
<label for="phone">Telefon nummer:</label>
<input type="text" name="phone" class="phone ui-input-text ui-body-c ui-corner-all ui-shadow-inset error" value=""><label for="phone" class="error" style="">Telefonnummer skal oplyses</label>
带有 jquery mobile 1.3.0 的代码:
<div class="ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow ui-body-c"><input type="text" name="phone" class="phone ui-input-text ui-body-c error" value=""><label for="phone" class="error" style="">Telefonnummer skal oplyses</label></div>
正如您在 jquery mobile 1.3.0 中看到的那样,他们放置了一个 div 包装器。我怎样才能解决这个问题?
谢谢。