correct a bad generated link using Javascript

前端 未结 4 1558
灰色年华
灰色年华 2021-01-26 12:36

I have a system that dynamically generates links. but the html links are displayed like this :



        
4条回答
  •  无人共我
    2021-01-26 13:14

    Yes, using the string split() function like this...

    S='Page Example';
    
    var A=split('"');
    
    document.write(A[1]);
    

    This should display "/page-example", and you can then add it as the href to an anchor.

提交回复
热议问题