JavaScript练习题目(1)按钮改变文本域值
2012-03-20 00:00
519 查看
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>My First Script</title> <script type="text/javascript"> function test() { var temp = document.getElementById('input_text'); temp.value = '哈哈'; } </script> </head> <body> <form> <label>输入</label><input id="input_text" type="text" value="默认值" /> <input type="button" value="设置为'哈哈'" onclick="test();" /> </form> </body> </html>
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/poechant/article/details/6975006
相关文章推荐
- JavaScript练习题目(1)按钮改变文本域值
- JavaScript练习题目(4)弹出新窗口,并点击其上的按钮可以进行(50px,50px)的位移
- JavaScript练习题目(3)点击按钮显示确认对话框
- JavaScript练习题目(3)点击按钮显示确认对话框
- JavaScript练习题目(4)弹出新窗口,并点击其上的按钮可以进行(50px,50px)的位移
- 剑指offer题目练习及思路分析-JavaScript版(一)
- javascript 切换按钮改变div颜色
- JavaScript练习题目(2)文本域内的字符串反转
- JavaScript实现点击单选按钮改变输入框中文本域内容的方法
- JavaScript实现点击单选按钮改变输入框中文本域内容的方法
- JavaScript练习题目(2)文本域内的字符串反转
- JAVASCRIPT通过点击按钮来改变字体颜色
- javaScript禁用数据按钮,按钮上字体会改变
- 通过javascript动态改变按钮的值
- HTML-JavaScript--单击按钮改变背景颜色
- Javascript点击按钮随机改变数字与其颜色
- javascript练习:8-13选择与改变事件
- Javascript动态改变按钮样式
- 用javascript实现改变TEXTAREA滚动条和按钮的颜色,以及怎样让滚动条变得扁平
- JavaScript中点击按钮,改变其他标签中的内容