I开发者_Go百科 want to connect to a mysql database using javascript.
If it is possible, how can I do this?
You could use AJAX to send a request to your server side script which will query the MySQL database. Javascript has no way of accessing a SQL database directly because it runs on the client. Imagine if this was possible: it would mean that anyone from his client computer would be able to send any SQL query he likes to your MySQL server which hopefully is not possible.
精彩评论