当代码里有多个引号时怎么解决? 在"号或'前加\即可,如onmousedown="this.className = \'td nav_blueActive hand\'" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 几种正确的写法:onmousedown="this.className = \"td nav_blueActive hand\""onmousedown="this.className = 'td nav_blueActive hand'"onmousedown='this.className = "td nav_blueActive hand"'onmousedown='this.className = \'td nav_blueActive hand\'' fivetwogtt(快乐睫毛) 归纳的好。只要一层是“,里面一层是‘就好了。要么转义。 可以用"标记,也可以用\"...\",需要嵌套的时候可以\\\"...\\\",转义符可以一直嵌套下去:document.write("<span style=\"width:100;background-color:yellow\" onclick=alert("test") onmouseover='status=\"abcd\\\"defg\\\"hijk\"'>test</span><br>"); 两个CHECKBOX,根据前一个的选择,自动改变后面checkbox选项内容 用<a>切换页面的时候, 保持视频链接,该怎么做? javascript空标签问题 请教:firefox如何模拟超链接点击 navigator.mimeTypes.length为什么会是0 ? 一段动态添加表单程序的Javascript代码 如何取得经过方向键移动的光标位置。 菜单问题? 请问Javascript高手们:国庆快乐! 如何实现将一个XML字符串组成一个XML文档,并从文档中取各节点的值?谢谢 100分求解 如何强制输入数字???在线等。。。 相对路径的问题,问题比较长,不能在标题描述,麻烦进来看看
onmousedown="this.className = \"td nav_blueActive hand\""onmousedown="this.className = 'td nav_blueActive hand'"onmousedown='this.className = "td nav_blueActive hand"'onmousedown='this.className = \'td nav_blueActive hand\''
只要一层是“,里面一层是‘就好了。要么转义。
document.write("<span style=\"width:100;background-color:yellow\" onclick=alert("test") onmouseover='status=\"abcd\\\"defg\\\"hijk\"'>test</span><br>");