quotes in javascript function
I need a bit of help with quotes in javascript function
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?POST_开发者_如何学PythonIN1="+value+","mywindow","width=800,height=600") ;
}
thanks!
"rpt_Distance.php?POST_IN1=" + value, "mywindow", "width=800,height=600"
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
}
I just removed +"
It helps if you ask a question, not just post a snippet function. Are you trying to insert actual quotes? If so escape them with '\'.
EDIT: Hats off to Shoban for being able to read minds (and code) :).
You have one +"
that must be removed:
window.open("rpt_Distance.php?$POST_IN1="+value+","mywindow","width=800,height=600") ;
must be replaced by:
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
This code should read to be correct - leaving out the +" after value
function jsNewWindow(value){
//window.open ("http://www.javascript-coder.com","mywindow");
window.open("rpt_Distance.php?$POST_IN1="+value,"mywindow","width=800,height=600") ;
}
精彩评论