在html事件、ajax以及在javascript中获取正确值方面存在一些问题

在html事件、ajax以及在javascript中获取正确值方面存在一些问题,javascript,php,html,ajax,Javascript,Php,Html,Ajax,我正试图将注意力集中在html事件、ajax和javascript的使用上 假设我有一个包含国家/地区的下拉框 countries: <select name='country' id='country' onchange='showhotel(this.value);showpictures(this.value);'> <option value='country1'>country1</option>

我正试图将注意力集中在html事件、ajax和javascript的使用上

假设我有一个包含国家/地区的下拉框

    countries: <select name='country' id='country' onchange='showhotel(this.value);showpictures(this.value);'>
               <option value='country1'>country1</option>
               <option value='country2'>country2</option>
               </select>
正如我所说,我使用ajax来实现这一点,因为img行是从php输出的,所以我尝试了我认为显而易见的方法

    echo ("<img src='$pictureOfHotel' onmouseover='showroom($hotel)'>");
echo(“”);

这不管用,我已经试了好几个小时了,我不知道该怎么做。如果您能提供任何帮助,我们将不胜感激。

您当前选择的酒店是否就是图片中显示的酒店?您在
展厅()中有什么功能?
?我建议,请显示酒店名称或使用鼠标单击并在弹出窗口中显示,而不是显示图像。在“showroom()”中,使用下拉元素Id并获取其值,然后在Ajax中传递。现在我在showroom中没有任何内容,我有一个表,其中列出了选定国家的所有酒店图片
   <div id='picture'> <img src='picture of hotel.jpg' onmouseover='showroom()'> </div>
   onmouseover="showroom(what the hell do i put in here to make this work???)"
    echo ("<img src='$pictureOfHotel' onmouseover='showroom($hotel)'>");