4条回答 默认 最新
斯洛文尼亚旅游 2016-08-27 04:42关注<style> input.error{border:solid 1px #f00} span.error{color:#f00;display:none} </style> <input type="text" onblur="this.className = this.value == '' ? 'error' : ''; this.nextSibling.style.display = this.value == '' ? 'inline' : 'none'" /><span class="error">不能为空!</span>本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
