DIV模拟select下拉菜单效

调用方法:

<textarea cols="50" rows="15" name="code" class="xhtml">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; &lt;title&gt;&lt;/title&gt; &lt;mce:script language=&quot;javascript&quot; src=&quot;/javascript/jquery-1.4.4.min.js&quot; mce_src=&quot;javascript/jquery-1.4.4.min.js&quot;&gt;&lt;/mce:script&gt; &lt;mce:script language=&quot;javascript&quot; src=&quot;/javascript/jquery.plugin_custom.js&quot; mce_src=&quot;javascript/jquery.plugin_custom.js&quot;&gt;&lt;/mce:script&gt; var option = [['显示名1','值1'],['显示名1','值1'],['显示名2','值2'],['显示名3','值3']]; &lt;mce:script type=&quot;text/javascript&quot;&gt;&lt;!-- 实现div模拟select插件代码--&gt; function select_list(name,value){ jQuery.dmSelect(name,value,option); } // --&gt;&lt;/mce:script&gt; &lt;head&gt; &lt;body&gt; &lt;input type=&quot;text&quot; value=&quot;&quot; id=&quot;123name&quot; name=&quot;123name&quot; style=&quot;width:80px; height:15px;&quot; onfocus=&quot;select_list('123name','123value')&quot; /&gt; &lt;input type=&quot;hidden&quot; name=&quot;123value&quot; id=&quot;123value&quot; /&gt; &lt;/body&gt; &lt;/html&gt; </textarea>

猜你喜欢

转载自blog.csdn.net/zc2087/article/details/6432230