一个简单JS

一个简单JS求助!JScript codedocument.write(img style\width:0pxheight:0px\ src\http:\/\/127.0

一个简单JS求助!

JScript code
document.write("<img style=\"width:0px;height:0px\" src=\"http:\/\/127.0.0.1\/51la.asp?id='+window.location.search+'\" \/>");


window.location.search为什么没获取到值?怎么写能获取到?

[解决办法]
document.write("<img style=\"width:0px;height:0px\" src=\"http:\/\/127.0.0.1\/51la.asp?id='"+window.location.search+"'\" \/>");
[解决办法]
探讨

好像不要单引号。因为你最外面是双引号,所以+号前后也要是双引号。
document.write("<img style=\"width:0px;height:0px\" src=\"http:\/\/127.0.0.1\/51la.asp?id="+window.location.search+"\" \/>");