问题
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