社区
JavaScript
帖子详情
浏览器问题,按钮上的文字不见了?
java_augur
2005-02-23 10:16:03
笨人正在学习javascript,
在调试了几个例子之后,发现按钮上的文字看不见了,
我怀疑是调试中关闭了哪个选项,(胡乱猜疑)
IE4,比如:<input type="button" value="submit" />
结果页面上只显示一个空白的button.
请指教一下,谢谢!
...全文
385
6
打赏
收藏
浏览器问题,按钮上的文字不见了?
笨人正在学习javascript, 在调试了几个例子之后,发现按钮上的文字看不见了, 我怀疑是调试中关闭了哪个选项,(胡乱猜疑) IE4,比如: 结果页面上只显示一个空白的button. 请指教一下,谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
java_augur
2005-02-23
打赏
举报
回复
个人觉得js难就难在兼容问题。现在明白为什么看似简单的js
一本书就1700多页。向每一位scripter致敬!
patchclass
2005-02-23
打赏
举报
回复
IE4?
嗨,找不到这个浏览器了
java_augur
2005-02-23
打赏
举报
回复
恍惚记得就是运行了那个时间显示的程序以后,出现了问题。
实在不好意思,给您添麻烦了。
java_augur
2005-02-23
打赏
举报
回复
<html>
<head>
<title>canHaveChildren Property</title>
<script type="text/javascript">
function colorAll() {
var elems = document.all;
for (var i = 0; i < elems.length; i++) {
elems[i].style.color = "red";
}
}
function colorChildBearing() {
var elems = document.all;
for (var i = 0; i < elems.length; i++) {
if (elems[i].canHaveChildren) {
elems[i].style.color = "red";
}
}
}
</script>
</head>
<body>
<h1>canHaveChildren Property Lab</h1>
<hr />
<form name="input">
<input type="button" value="Color All Elements"
onclick="colorAll()" /><br />
<input type="button" value="Reset" onclick="history.go(0)" /><br />
<input type="button"
value="Color Only Elements That Can Have Children"
onclick="colorChildBearing()" />
</form>
<br />
<hr />
<form name="output">
<input type="checkbox" checked="checked" />Your basic checkbox <input
type="text" name="access2" value="Some textbox text." />
</form>
<table id="myTable" cellpadding="10" border="2">
<tr>
<th>Quantity</th>
<th>Description</th>
<th>Price</th>
</tr>
<tbody>
<tr>
<td width="100">4</td>
<td>Primary Widget</td>
<td>$14.96</td>
</tr>
<tr>
<td>10</td>
<td>Secondary Widget</td>
<td>$114.96</td>
</tr>
</tbody>
</table>
</body>
</html>
java_augur
2005-02-23
打赏
举报
回复
试过了,不是这个问题。<html>
<head>
<title>getExpression(), setExpression(), and recalc() Methods</title>
<style type="text/css">
th {text-align:right}
span {vertical-align:bottom}
</style>
<script type="text/javascript">
var now = new Date();
var shortWidth = 5;
var multiple = 2.5;
function init() {
with (document.all) {
hoursBlock.style.setExpression("width","now.getHours() * shortWidth * multiple","jscript");
hoursLabel.setExpression("innerHTML","now.getHours()","jscript");
minutesBlock.style.setExpression("width","now.getMinutes() * shortWidth","jscript");
minutesLabel.setExpression("innerHTML","now.getMinutes()", "jscript");
secondsBlock.style.setExpression("width","now.getSeconds() * shortWidth","jscript");
secondsLabel.setExpression("innerHTML","now.getSeconds()", "jscript");
}
updateClock();
}
function updateClock() {
now = new Date();
document.recalc();
setTimeout("updateClock()",1000);
}
function showExpr() {
alert("Expression for the \'Hours\' innerHTML property is:\r\n" + document.getElementById("hoursLabel").getExpression("innerHTML") + "."); }
</script>
</head>
<body onload="init()">
<h1>getExpression(), setExpression(), recalc() Methods</h1>
<hr />
<p>This clock uses Dynamic Properties to calculate bar width and time
numbers:</p>
<table border="0">
<tr>
<th>Hours:</th>
<td><span id="hoursBlock" style="background-color:red"></span>
<span id="hoursLabel"></span></td>
</tr>
<tr>
<th>Minutes:</th>
<td><span id="minutesBlock" style="background-color:yellow"></span>
<span id="minutesLabel"></span></td>
</tr>
<tr>
<th>Seconds:</th>
<td><span id="secondsBlock" style="background-color:green"></span>
<span id="secondsLabel"></span></td>
</tr>
</table>
<hr />
<form>
<input type="button" value="Show 'Hours' number innerHTML Expression" onclick="showExpr()" />
</form>
</body>
</html>
这段代码中的button是白板一个。
下面我再贴的这段button则可以正常显示。但我没能观察出二者有何区别?
meizz
2005-02-23
打赏
举报
回复
<input type="button" value="submit"> 这样试试
可能是IE4不支持 < /> 这种关闭对应吧
input框中出现提示
文字
(兼容ie 火狐 谷歌)
为了解决这个
问题
,我们需要采用一些技巧来实现跨
浏览器
的提示
文字
兼容性。附件中的"input框中出现提示
文字
(兼容ie 火狐 谷歌)"可能包含了一个JavaScript或者jQuery的解决方案,旨在为旧版IE、火狐和谷歌
浏览器
...
vue-cookie-accept-decline-在页面上显示带有
文字
,拒绝
按钮
和接受
按钮
的横幅。 记住使用cookie进行选择。 使用创建时的当前选择来发出事件。 符合GDPR要求。-Vue.js开发
vue-cookie-accept-decline在页面上显示带有文本,拒绝
按钮
和接受
按钮
的横幅。 记住使用cookie进行选择。 发出ev vue-cookie-accept-decline在页面上显示带有文本,拒绝
按钮
和接受
按钮
的横幅。 记住使用cookie进行...
主页:个人
浏览器
主页
在IT领域,
浏览器
主页是用户打开
浏览器
时默认显示的页面,通常可以自定义设置以满足个人喜好和效率需求。"主页:个人
浏览器
主页"这个标题表明我们将探讨如何创建和定制一个专属于个人的
浏览器
主页。"简洁主页-ZHUYE....
web-and-mobile-accessibility:开发现代和可访问的Web内容的项目
去做 :calendar: 截止日期:5月20日 :calendar: 练习2 字体大小
按钮
(Qas)
文字
可读性(实时) 页面区域[由Qas合并21.04.2021] 阅读顺序练习3 将3个文章div元素切换到HTML5语义标记(Clara) 检查index.html中的...
看
不见
的
文字
?Edge
浏览器
的‘隐身’
文字
大揭秘!
遇到了 Edge
浏览器
上
文字
不见
了的情况?别慌,也许
文字
只是玩了个藏猫猫。这不是超能力,只是一个小
问题
!
JavaScript
87,994
社区成员
224,708
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章