xml
<input id='searchInput' placeholder='{{phValue}}' type="text" bindfocus='onFocus' bindblur='onBlur'/>
js
Page({
// 页面的初始数据
data: {
phValue:"请输入要录入的单词"
},
onFocus: function (e) {
this.setData({
phValue:" "
})
},
onBlur: function (e) {
this.setData({
phValue: "请输入要录入的单词"
})
}
})