Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/415.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript REGEX-不带引号的所有属性_Javascript_Regex_Attributes - Fatal编程技术网

Javascript REGEX-不带引号的所有属性

Javascript REGEX-不带引号的所有属性,javascript,regex,attributes,Javascript,Regex,Attributes,我有以下html字符串 <span onclick="Popup=window.open('C_SPD').URL;','Popup','menubar=No,toolbar=No,scrollbars=Yes,width=600,height=500,top=20,left=60,resizable=yes');return fallse;" href="#">xyz</span> <a href=mailto@abc.com?subject=LongTerm

我有以下html字符串

<span onclick="Popup=window.open('C_SPD').URL;','Popup','menubar=No,toolbar=No,scrollbars=Yes,width=600,height=500,top=20,left=60,resizable=yes');return  fallse;" href="#">xyz</span>

<a href=mailto@abc.com?subject=LongTerm  third=third>esc@abc.com</a>
xyz

我需要在缺少属性的地方加上双引号。

这是一项解析工作。使用服务器端语言或节点。在html5中,任何情况下都没有有效的引号。顺便说一句,你有一个输入错误
return fallse我需要用javascriptHTML修复它Tidy是你最好的朋友。参考。