我用一些 Javascript 代码制作了一个页面:
function createNewWindow () {
var userName = document.getElementById('user_name').value;
var newPage = "<html><head><title>";
newPage += userName;
newPage += "</title></head><body>";
newPage += "<p>Hello " + userName;
newPage += "</p></body></html>";
var j = window.open('');
j.document.write(newPage);
j.document.close();
}
现在dreamweaver 说行有错误:
var userName = document.getElementById('user_name').value
var newPage = "<html><head><title>"
我没有看到错误,我搜索了整个互联网。有人来帮助我吗?