|
大大您好,小弟有各移惑
小弟寫了各輪播式廣告
功能都正常,但是小弟想點擊廣告時,會傳會該廣告id給javascript再傳給PHP寫入MYSQL
小弟目前,已經可以傳id了,但是永遠都是抓最後一個id值,請懂的大大指導一下,我把程式貼下面
- <body onLoad="load()">
- </body>
- <div align="center">{literal}<script type="text/javascript" src="adv.php"></script>{/literal}</div>
複製代碼
adv.php
adv.css
- #f_div{width:700px; height:200px; margin:0 auto; overflow:hidden;
- }
- #f_imgDiv{width:700px; height:200px; overflow:hidden;}
- #f_img{filter:progid:DXImageTransform.Microsoft.Fade(Overlap=1.00); border:0;}
- #f_infoDiv{width:700px;top:-16px;position:relative;background:#333;filter:Alpha(Opacity=70);-moz-opacity: 0.7; opacity: 0.7;}
- #f_buttonDiv{width:700px; margin-right:1px; height:18px; overflow:hidden; text-align:left;color:#fff;}
- #f_buttonDiv div,#f_buttonDiv .bg{
- width:20px;height:18px; background:#333; float:right;
- display:table-cell;
- vertical-align:middle;
- }
- /*#f_buttonDiv .bg{width:94px;height:18px; background:#333; float:right; }*/
- #f_buttonDiv a{
- width:20px;height:18px !important;
- float:right;
- padding-top:5px;
- color:#fff;
- /*font-family:Arial, Helvetica, sans-serif;*/
- font-family:serif;
- font-size:12px;
- text-align:center;
- /*display:block;*/
- overflow:hidden;
- text-decoration:none;
- /*position:absolute;*/
- position:relative;
- top:-2px;
- }
- *+html>body #f_buttonDiv a{top:-1px;}/*ie7*/
- #f_buttonDiv div > a{top:-5px;}
- #f_buttonDiv a:link,#f_buttonDiv a:visited,#f_buttonDiv a:active{color:#fff;}
- #f_buttonDiv a:hover{color:#aaa;}
- #f_buttonDiv a.on:link,#f_buttonDiv a.on:visited,#f_buttonDiv a.on:active,#f_buttonDiv a.on:hover{background:#99CC33;color:#000;}
- #f_buttonDiv a.on:hover{background:#99CC33;}
複製代碼 |
|