点击按钮将字符串放到一个文本框中 点击按钮将字符串放到一个文本框中怎样实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>function mytest(){ document.all.test.value="你想要的字符串";}</script><input type="text" name="test" value=""><input type="button" name="but" value="点击" onclick="mytest()"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title><script>function myFun(msg){ var txt = document.getElementById("txt"); txt.value = msg;}</script></head><body><input type="text" id="txt"><input type="button" onClick="myFun('一个小例子');" value="测试"></body></html>呵呵 来晚了 不过还是贴出来。 mouseout和mouseover当快速移动 事件延迟触发问题 怎么得到qq空间的网页代码 【求助!】如何在新窗口打开后重新设定它的属性呢?谢谢! js中参数如何传递 返回值的问题 使用node.js开发rest api,如果提供文件上传接口 登陆后如何返回原来的界面? 请问js的select语句是怎么写的。 如何在两个页面中传递两个参数? 在线等待 急急急急急急急急急急急!!!! javascript如何循环执行某一函数? 读一个变量的值 求一段显示菜单高亮的代码
function mytest()
{
document.all.test.value="你想要的字符串";
}
</script><input type="text" name="test" value="">
<input type="button" name="but" value="点击" onclick="mytest()">
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script>
function myFun(msg)
{
var txt = document.getElementById("txt");
txt.value = msg;
}
</script>
</head><body>
<input type="text" id="txt">
<input type="button" onClick="myFun('一个小例子');" value="测试">
</body>
</html>
呵呵 来晚了 不过还是贴出来。