如过你在asp.net后台生成html代码然后输出到客户端就可能发生错误。

错误的写法:

onmouseover='currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff ' '

this.style.backgroundColor='#6699ff '此处脚本会认为它是非法的字符串不给予通过,就是提示:illegal character

正确写法:

onmouseover='currentcolor=this.style.backgroundColor;this.style.backgroundColor=\"#6699ff\"  '

this.style.backgroundColor;this.style.backgroundColor=\"#6699ff\" 此处加上转义符就可以了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-10-16
  • 2021-05-20
  • 2022-02-14
  • 2022-01-15
猜你喜欢
  • 2021-09-12
  • 2021-09-04
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案