0
我正在用html5写移动页面,并且有一个需要属性的输入元素。如果没有输入,错误提示会显示。但它出现在chrome v30的输入中心点。所以我的quetion是如何将错误提示移到输入的开头?html5输入错误提示
<input type='text' required='required' data-tips='why here?why not start?'/>
<script type='text/javascript'>
var i = document.getElementsTagName('input')[0];
i.setCustomValidity(i.getAttribute('data-tips'));
</script>
请显示一些代码 – BeNdErR