鄙人写的select值存到input中出来点问题,跪等各位大侠帮忙解答。代码如下 htmlcssphpjsjq 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用jquery ,select加上onchange事件 <select name="select" onchange="$('input').val($('select option:selected').val())";这样就有值了 <select name="select" style="position:absolute;margin:-10px 0 0 -10px;width:110px;height:20px; clip:rect(0 120 24 100)" id="select" onchange="document.getElementsByName('seo_comment[]')[0].value=select.value;document.getElementsByName('seo_comment[]')[0].select()"> <option value="aaa">aaa</option> <option value="bbb">bbb</option> <option value="ccc">ccc</option> </select> <script type="text/javascript"> function change(){ document.getElementById('txt').value = document.getElementById('select').value; } </script> <select name="select" style="position:absolute;margin:-10px 0 0 -10px;width:110px;height:20px; clip:rect(0 120 24 100)" id="select" onchange="change()"> <option value="aaa">aaa</option> <option value="bbb">bbb</option> <option value="ccc">ccc</option> </select> <input type="text" style="position:absolute;margin:-10px 0 0 -10px;width:88px;height:16px" name="seo_comment[]" id="txt" value=""> 关于远程访问api phprpc 的一个问题 动态页面中js 实现跨域访问页面 请问应该选用什么样的方式储存模板 PDOStatement::setFetchMode()这个方法好像没有太大作用。。请举一个例子说明一下。。 页面能自适应手机屏幕大小,在里面的图片不能 php不能解析这样的json 文件读取的问题.. 新作网站,我这样的水平出去能找到多少钱一个月的工作啊? PHP如何防止远程提交? 多维数组为什么不能正常工作,马上给分 最佳PHP学习路线 防止一些常见的广告发帖,有什么方法?
<select name="select" onchange="$('input').val($('select option:selected').val())";
这样就有值了
<option value="aaa">aaa</option>
<option value="bbb">bbb</option>
<option value="ccc">ccc</option>
</select>
<script type="text/javascript">
function change(){
document.getElementById('txt').value = document.getElementById('select').value;
}
</script> <select name="select" style="position:absolute;margin:-10px 0 0 -10px;width:110px;height:20px; clip:rect(0 120 24 100)" id="select" onchange="change()">
<option value="aaa">aaa</option>
<option value="bbb">bbb</option>
<option value="ccc">ccc</option>
</select>
<input type="text" style="position:absolute;margin:-10px 0 0 -10px;width:88px;height:16px" name="seo_comment[]" id="txt" value="">