Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.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 如何从Raphael对象中删除空HREF属性?_Javascript_Jquery_Raphael - Fatal编程技术网

Javascript 如何从Raphael对象中删除空HREF属性?

Javascript 如何从Raphael对象中删除空HREF属性?,javascript,jquery,raphael,Javascript,Jquery,Raphael,我想取消设置(删除)文本对象的href属性。 怎么做?试试看 var paper = Raphael( 0, 0, 100, 100 ); var rect = paper.rect( 0, 0, 100, 100 ); // just set it to nothing rect.attr({ href: "" });

我想取消设置(删除)文本对象的href属性。 怎么做?

试试看

var paper = Raphael( 0, 0, 100, 100 );
var rect = paper.rect( 0, 0, 100, 100 );

// just set it to nothing
rect.attr({ href: "" });