How to pass special characters to javascript window.open in URL using paper.add method?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:04:28

问题


paper.add([{
              type: "text",
               x: 340 + textLength + 28,
               y: 410,
               text: "4860",
               fill: "blue", 
                    href:"javascript:window.open('https://planning.partners.com/ep/#Create Campaign&CId=4860');void(0)"
                    }
                ]).attr({ 'font-size': 14, "font-family": "Segoe UI", "text-decoration": "underline", 'text-anchor': "start" });

The above code is rendering the text (4860) fine and showing the hyperlink. But when i am clicking on the hyperlink, the window is opening with the URL "https://planning.partners.com/ep/". The special character # and rest of the URL skipped. How to pass special characters to javascript window.open in URL using paper.add method?

来源:https://stackoverflow.com/questions/9060294/how-to-pass-special-characters-to-javascript-window-open-in-url-using-paper-add

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!