input框聚焦后,placeholder内容设置为空不会消失
<input name=‘nameInput’ type=‘text’ value=’{{name}}’ placeholder=’{{name_placeholder}}’ placeholder-class=‘placeholder’ bindfocus=‘focusName’ bindblur=‘blurName’></input>
focusName: function(e){
this.setData({
name_placeholder:‘’
})
},
代码如上,开发者工具中是没有问题的,真机调试时,placeholder不会消失,如下图