Home > Article > Backend Development > JS中怎么把这两堆字体连接在一块显示到文本框
JS中怎么把这两堆字体连接在一块显示到文本框 ,想要的结果 http://localhost/zc.php?id=31
<?phperror_reporting(E_ALL || ~E_NOTICE);$str="31";$result=mysql_query("select * from ot_user where UE_account=$str"); while($rs=mysql_fetch_array($result)){?><script type = "text/javascript"> window.onload = function(){ var oTextbox1=document.getElementById("zhxm");; var oTextbox1=document.getElementById("zhxm");; oTextbox1.value="echo http://localhost/zc.php?id="."<?php echo $rs['UE_ID'] ?>"; //贬值给文本框 oTextbox1.readOnly = true; //文本框不可选 } </script>
js连接是用+号。和java一样
js用“+”号把字体连接在一起。
oTextbox1.value="http://localhost/zc.php?id=<?php echo $rs['UE_ID'];?>";//贬值给文本框