當我運行下面的代碼:包括reponse.write鏈接
res.write("Author: ");
res.write("<a href='" + tweet[i].Link + "' target='_blank'>" + tweet[i].Lable + "</a> \n");
res.write("Date: " + tweet[i].TDate + "\n");
我得到這個:
Author: <a href='https://twitter.com/esti_palombo' target='_blank'>esti_palombo</a>
Date: 2016-03-12T00:00:00.000Z
Author: <a href='https://twitter.com/AbdElrazek_Esam' target='_blank'>AbdElrazek_Esam</a>
Date: 2016-03-08T00:00:00.000Z
正如你所看到的,鏈接不工作
但當我刪除第一行res.write("Author: ");
時:
esti_palombo Date: 2016-03-12T00:00:00.000Z AbdElrazek_Esam Date: 2016-03-08T00:00:00.000Z
鏈接工作正常,但新行\n
不起作用!
有人可以幫我這個