Dar*_*rov 23
嗯,这对我有用(在Chrome 4,FireFox 3.6,IE8上测试):
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$("#thebutton").val("New text");
});
</script>
</head>
<body>
<input id="thebutton" type="submit" value="OK" />
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
如果您使用的是 html 按钮,<button id='thebutton ' > Button Val </button>
则使用$("#thebutton").text("NEW Text");
| 归档时间: |
|
| 查看次数: |
23865 次 |
| 最近记录: |