怎么实现这个语句! onmouseover的时候打开一个窗口是很好做的,但是onmouseout的时候想关闭刚刚打开的窗口根本不可能实现最好的办法是把你要显示的内容放置在一个隐藏的层上面,onmouseover的时候设置该层为visible,onmouseout的时候再设成隐藏 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我想照你这个方法应该不能实现吧!看看下面这个例子吧!http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow.htm 我写了echo "<div id=\"Layer1\" style=\"position:absolute; left:".$m_x."px; top:".$m_y."px; width:20px; height:20px; z-index:1;cursor:hand;\" onMouseOver=\"winopen($m_machine_id);return true\" onMouseOut=\"winmsg.colse();\">";函数是function winopen() { winmsg=window.open("jkxx.php?machine_id=$m_machine_id","","height=220,width=180"); }却提示出错!为什么? 显然语句:winmsg=window.open("jkxx.php?machine_id=$m_machine_id","","height=220,width=180");中的$m_machine_id 变量是不合法的。PHP的变量在JAVASCRIPT是不认的,你试试将这句用PHP的echo输出来。 $winmsg=window.open("jkxx.php?machine_id=$m_machine_id","","height=220,width=180");echo $winmsg;这样可以?! 我找到了这个语句了,谢谢上面的几位大哥 echo "<div id=\"Layer1\" style=\"position:absolute; left:".$m_x."px; top:".$m_y."px; width:20px; height:20px; z-index:1;cursor:hand;\" onMouseOver=\"javascript:newwin=window.open('jkxx.php?machine_id=$m_machine_id','','left=$m_x1,top=$m_y1,height=220,width=180')\" onmouseout=\"javascript:newwin.close()\">"; 如何用php socket模仿浏览器啊 【求助】日期搜索显示的问题 csdn怎么不开个flash as3版块 apache+php+mysql环境搭建完,怎样运行程序? 服务器有的没打开全局变量auto_global怎么办现在 请教关于新闻的上下篇代码 ×××××一个PHP的SESSION验证问题!!!!! 点击一次鼠标,打开一个提示窗口,同时隐含传参数给另一个程序(不再打开窗口) 我怎么才能让留言时间和北京时间对应呀?它显示的是服务器时间,怎么改呀? php调用Python问题 求救 正则表达式问题,高手出手帮忙
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow.htm
echo "<div id=\"Layer1\" style=\"position:absolute; left:".$m_x."px; top:".$m_y."px; width:20px; height:20px; z-index:1;cursor:hand;\" onMouseOver=\"winopen($m_machine_id);return true\" onMouseOut=\"winmsg.colse();\">";
函数是
function winopen()
{
winmsg=window.open("jkxx.php?machine_id=$m_machine_id","","height=220,width=180");
}
却提示出错!为什么?
echo $winmsg;
这样可以?!
echo "<div id=\"Layer1\" style=\"position:absolute; left:".$m_x."px; top:".$m_y."px; width:20px; height:20px; z-index:1;cursor:hand;\" onMouseOver=\"javascript:newwin=window.open('jkxx.php?machine_id=$m_machine_id','','left=$m_x1,top=$m_y1,height=220,width=180')\" onmouseout=\"javascript:newwin.close()\">";