鼠标单击(在Internet Explorer中)更改(切换)html按钮的图像(Change(toggle) image of a html button on mouse click (in Internet Explorer))
鼠标单击(在Internet Explorer中)更改(切换)html按钮的图像(Change(toggle) image of a html button on mouse click (in Internet Explorer))
我有一个带图像的HTML按钮,可以在每次点击时切换图像。 这是我用来在每次点击时设置类的方法,并根据当前的类图像显示。
fu
鼠标单击(在Internet Explorer中)更改(切换)html按钮的图像(Change(toggle) image of a html button on mouse click (in Internet Explorer))
我有一个带图像的HTML按钮,可以在每次点击时切换图像。 这是我用来在每次点击时设置类的方法,并根据当前的类图像显示。
function FullScreenToggle(el){ if(!="ns") { ="ns"; } else if(=="ns") { ="fs"; } return false; }更新
我的HTML
<button class="fullScreen" data-dojo-type="dijit.form.Button" onclick="FullScreenToggle(this);" id="butFullScreen"> <input type="image" class="ns" onclick="FullScreenToggle(this);" value="" />Update
my html
<button class="fullScreen" data-dojo-type="dijit.form.Button" onclick="FullScreenToggle(this);" id="butFullScreen"> <input type="image" class="ns" onclick="FullScreenToggle(this);" value="" />CSS
.claro #butFullScreen .ns{ background-image: url("images/fullScreen.png"); } .claro #butFullScreen .fs{ background-image: url("images/fullScreenExit.png"); }最满意答案
任何人都想知道如何做Fabien的答案: http : ///wHkVg/2/
更改背景图像的示例(未经测试):
// On button click $('#butFullScreen').click(function() { // Change background image $(this).css('background-image', url('images/fullScreen.png')); });Incase anybody wants to know how to do Fabien's answer: http:///wHkVg/2/
Example of changing background image (untested):
// On button click $('#butFullScreen').click(function() { // Change background image $(this).css('background-image', url('images/fullScreen.png')); });#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上传时间: 2023-04-21 00:31:47
推荐阅读
留言与评论(共有 9 条评论) |
本站网友 脖子后面有痣 | 15分钟前 发表 |
url('images/fullScreen.png')); }); | |
本站网友 ttl值 | 10分钟前 发表 |
///wHkVg/2/ Example of changing background image (untested) | |
本站网友 家庭装修步骤图表 | 7分钟前 发表 |
url("images/fullScreen.png"); } .claro #butFullScreen .fs{ background-image | |
本站网友 明园小安桥 | 23分钟前 发表 |
function FullScreenToggle(el){ if(!="ns") { ="ns"; } else if(=="ns") { ="fs"; } return false; } 更新 我的HTML <button class="fullScreen" data-dojo-type="dijit.form.Button" onclick="FullScreenToggle(this);" id="butFullScreen"> <input type="image" class="ns" onclick="FullScreenToggle(this);" value="" /> Update my html <button class="fullScreen" data-dojo-type="dijit.form.Button" onclick="FullScreenToggle(this);" id="butFullScreen"> <input type="image" class="ns" onclick="FullScreenToggle(this);" value="" /> CSS .claro #butFullScreen .ns{ background-image | |
本站网友 冀东油田贴吧 | 23分钟前 发表 |
可以在每次点击时切换图像 | |
本站网友 融泽嘉园 | 27分钟前 发表 |
// On button click $('#butFullScreen').click(function() { // Change background image $(this).css('background-image' | |
本站网友 胸最大的女人 | 15分钟前 发表 |
并根据当前的类图像显示 | |
本站网友 四道口海鲜市场 | 6分钟前 发表 |
///wHkVg/2/ Example of changing background image (untested) |