שלח תשובה

זירת השאלות

1 תשובות

  1. אוריקס הגיב:


    String.prototype.addLinks = function() {
        return this.replace(/(^|\b)(http:\/\/|www\.)([^\s,]+)/g,"$1<a target=\"_blank\" href=\"http://$3\">$2$3</a>");
    }

    var x="asfklhsd klf hasdkl jfkl;asdj fl;k jsdl;f . http://www.walla.com skflsadjf las http://nana.co.il http://www.yahoo.com&quot;;
    document.write(x.addLinks());

    באדיבות dagon ואלעד

שלח תשובה