I've got the following function
function make(point, name, message, type, file, id, lat, lng)
I want this function to pass all of these Javascript variables to a php file which would open in a window when a link is pres开发者_运维百科sed how would I do this?
window.open('path/to/php?point=' + point + '&name=' + name); // etc for all other vars
make sure the values of your variables are urlsafe, i'd urlencode them with:
encodeURIComponent(variable);
Edit re your comment
<a href="#" onclick="make(vars, go, here); return false;">Click me!</a>
but if thats all you want, you might as well just have the link open in a blank window:
<a href="path/to/php?point=foo&etc=bar" target="_blank">Click me!</a>
It depends if make() is doing something else other than opening a window, i suspect so?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论