开发者

Javascript Dropdown for ImageSelector

开发者 https://www.devze.com 2023-01-22 03:41 出处:网络
I\'ve got an SQL database im doing some queries on and filling in a dropdown box with the code. It\'s a select/combo box. It returns my database fields.

I've got an SQL database im doing some queries on and filling in a dropdown box with the code.

It's a select/combo box. It returns my database fields.

red black green.

In the source code i modified开发者_如何学编程 the query to get a second field in the same table. red.jpg black.jpg green.jpg.

How can i at runtime display a picture of a red shirt using the onChange() function in javascript? I found this online example useful javascriptkit .com/script/cut173.shtml

$interface is my sql query pic1 is the image being changed the html code looks like this Choosered green black

heres the snippets. any help is greatly appreciated. http://pastebin.com/mgqrEiJu


This should solve your problem. Loop through all the records and print out <option value="$url">$name</option>

0

精彩评论

暂无评论...
验证码 换一张
取 消