<input type="text" name="sText" value="">
<input type="button" value="1" onclick="setText();">
<input type="button" value="2" onclick="setText();">
<input type="button" value="3" onclick="setText();">
<input type="button" value="4" onclick="setText();"><Script Language="JavaScript">
function setText()
{
document.all("sText").value=document.all("sText").value+event.srcElement.value;
}
</Script>
<input type="button" value="1" onclick="setText();">
<input type="button" value="2" onclick="setText();">
<input type="button" value="3" onclick="setText();">
<input type="button" value="4" onclick="setText();"><Script Language="JavaScript">
function setText()
{
document.all("sText").value=document.all("sText").value+event.srcElement.value;
}
</Script>
解决方案 »
- 求助——当html语言放在javascript语句中如何改写,单引号和双引号所引起的问题
- EXTJS中如何在外部调用函数
- 如何实现收缩展开一个TABLE,请教了.
- 如何实现像QQ邮箱的导航栏那样可以不刷新页面更换网页中容器?
- 怎么才能验证输入的字符串只能是26个大小写字母和中文吗?配备字符串怎么写
- 我从QQ网上抄了一个播放器,要在放视频时加一段广告图片或flash? 我该如何
- 请问这样的功能怎样实现?各位兄弟进来帮帮忙吧!!
- 谁能帮我解释一下!!!
- 那位大哥可以告诉我怎么做出这样的菜单下拉效果???
- [require.js]为什么会提示其中一个依赖undifined?
- innerHTML 输出中的双引号,里面有个单引号,如何表示?
- 能不能去掉网页的标题栏?如果能,怎么去?
我试了一下,但是在document.all("sText")报错。
<input name="sText" value="">
<input type="button" value="1" onclick="this.form.sText.value += value">
<input type="button" value="2" onclick="this.form.sText.value += value">
<input type="button" value="3" onclick="this.form.sText.value += value">
<input type="button" value="4" onclick="this.form.sText.value += value">
</form>
<input name="sText" value="">
<input type="button" value="1" onclick="this.form.sText.value += value">
<input type="button" value="2" onclick="this.form.sText.value += value">
<input type="button" value="3" onclick="this.form.sText.value += value">
<input type="button" value="4" onclick="this.form.sText.value += value">
</form>