For me, basic alert function did worked. I am not very sure about how Launch let JS work inside the web page.
Adobe Launch is to insert Tags into to web pages and retrieve the values the web-page. I am not very sure if using Launch for setting would be best practice. If you aim is to save some edited/appended value to the existing page title then that you can easily so by using Data Elements in Adobe Launch.
Jantzen.Belliston Adobe Launch expert need to intervene here to clear some more doubts here.