How to pass special characters to javascript windo

2019-07-25 13:14发布

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?

0条回答
登录 后发表回答