我写在javascript一个HTML的结构,我需要返回时,链接clicked.I编写HTML有它这样的问题与报价,同时在JavaScript
return '<div class="contactForm">'+
'<input type="text" name="contactName" onBlur="if (this.value == "") {this.value == "Name";}" onFocus="if ((this.value == "") || (this.value == "Name")) {this.value = "";};" value="Name" style="">'+
当我看到它在页面上的onBlur
属性出现在红色颜色和引号错位。我在页面上看到它。
<input name="contactName" onblur="if (this.value == " ")="" {this.value="Name" ;}"="" onfocus="if ((this.value == " ||="" (this.value="=" "name"))="" ;};"="" value="Name" style="" type="text">
我怎么能写返回部分,让我得到它的权利在HTML页面?我相信这是由于报价让misplaced.I在页面的源代码查看这个错误看到报价的预期时属性名称