鼠標(biāo)停在圖片上變成小手怎么實(shí)現(xiàn)
學(xué)習(xí)前端的同學(xué)你們知道怎么使鼠標(biāo)停在圖片上變成小手嗎?下面是學(xué)習(xí)啦小編收集整理關(guān)于鼠標(biāo)停在圖片上變成小手的資料以供大家參考學(xué)習(xí),希望大家喜歡。
鼠標(biāo)停在圖片上變成小手的代碼
加個(gè)樣式就ok了
style=“cursor:cursor:pointer”
dwr 寫的js
<script type="text/javascript">
<!--
var bikelistCache = { };
function findMnotes(mId,pId,uId,n, callbck)
{
MnoteAction.getMnoteList2(mId,pId,uId,
function (list)
{
/*
dwr.util.removeAllRows("tablebody"+n, { filter:function(tr)
{
// alert(tr.id);
return (tr.id != "template"+n);
}
}
);
*/
var mnote, id;
//list.sort( function(p1, p2) { return p1.id < p2.id;} );//排序
//alert(DWRUtil.toDescriptiveString(list,'id'));
if(list!=null && list.length>0){
$("div"+n).style.display="none";
for (var i = 0; i < list.length; i++) {
mnote = list[i];
id = mnote.noteId;
//復(fù)制模板行,并加上后綴比如id變成id0, id1... type變成type0,type1, edit變成 edit0,edit1
dwr.util.cloneNode("template"+n, { idSuffix:id });
// dwr.util.setValue("tabid" + id, mnote.meetingId);
if(mnote.title.length1=null && mnote.title.length>12){
dwr.util.setValue("tabtype" + id, mnote.title.substring(0,12));
}else{
dwr.util.setValue("tabtype" + id, mnote.title);
}
//dwr.util.setValue("bid"+id,mnote.type);
//$("bid"+id).innerText=mnote.type;
$("tabtype"+id).title=mnote.title;
if(mnote.type==null || mnote.type==''){
$("tabtype"+id).innerHTML="<b>["+" "+"]</b>"+$("tabtype"+id).innerText;
}else{
$("tabtype"+id).innerHTML="<b>["+mnote.type+"]</b>"+$("tabtype"+id).innerText;
}
//alert($("tabtype"+id).innerText);
// dwr.util.setValue("tabbikeName" + id, mnote.phase);
// alert($("template"+n + id));
if(mnote.state==1){
$("imgState"+id).src="images/meeting/xts_OK.png";
$("imgState"+id).alt="已完成";
}
$("template"+n + id).style.display = "block"; //把被復(fù)制的行顯示打開
bikelistCache[id]=mnote;
}
}else{
$("div"+n).style.display="block";
}
if(callbck)
callbck()
//alert(tablebody.innerHTML);
//alert(DWRUtil.toDescriptiveString(bikelistCache,'id')); //調(diào)試
}
)
}
function initTab()
{
//alert('<s:property value="#session.user.userId" />');
<% List list1=WafDataProxy.getDataItemListByDataId("meetingphase");
if(list1!=null && list1.size()>0){
for(int i=0;i<list1.size();i++){
DataItem d=(DataItem)list1.get(i);
d.getItemDescription();
d.getItemValue();
%>
findMnotes('<s:property value="meetingId" />','<%=d.getItemId() %>','<s:property value="#session.user.userId" />',<%=i%>);
<%
}
}%>
}
function save()
{
//if(mnoteForm20.title.value.length>18){
// alert('輸入的內(nèi)容太長(zhǎng)!不能超過十八個(gè)字!');
// return;
//}
var mnote = {meetingId:null, title:null,userId:null, phase:null,type:null};
dwr.util.getValues(mnote);
// alert(DWRUtil.toDescriptiveString(bike,"id"));
// var sel = $("years_sel").value==""?null:$("years_sel").value;
if(mnote.title=='' || mnote.title==null){
alert('內(nèi)容不能為空,請(qǐng)?zhí)顚憙?nèi)容!');
return ;
}
dwr.engine.beginBatch();
MnoteAction.UpdateNote(mnote);
findMnotes('<s:property value="meetingId" />','meetingphase_701','<s:property value="#session.user.userId" />',0);
dwr.engine.endBatch();
document.getElementById("addTr").style.display="none";
}
function save1()
{
var mnote = {meetingId:null, title:null,userId:null, phase:null,type:null};
dwr.util.getValues(mnote);
mnote.phase=mnoteForm21.phase1.value;
mnote.title=mnoteForm21.title1.value;
mnote.type=mnoteForm21.type1.value;
if(mnote.title=='' || mnote.title==null){
alert('內(nèi)容不能為空,請(qǐng)?zhí)顚憙?nèi)容!');
return ;
}
// return;
// alert(DWRUtil.toDescriptiveString(bike,"id"));
// var sel = $("years_sel").value==""?null:$("years_sel").value;
dwr.engine.beginBatch();
MnoteAction.UpdateNote(mnote);
findMnotes('<s:property value="meetingId" />','meetingphase_702','<s:property value="#session.user.userId" />',1);
dwr.engine.endBatch();
document.getElementById("addTr1").style.display="none";
}
function save2()
{
var mnote = {meetingId:null, title:null,userId:null, phase:null,type:null};
dwr.util.getValues(mnote);
mnote.phase=mnoteForm22.phase2.value;
mnote.title=mnoteForm22.title2.value;
mnote.type=mnoteForm22.type2.value;
if(mnote.title=='' || mnote.title==null){
alert('內(nèi)容不能為空,請(qǐng)?zhí)顚憙?nèi)容!');
return ;
}
// return;
// alert(DWRUtil.toDescriptiveString(bike,"id"));
// var sel = $("years_sel").value==""?null:$("years_sel").value;
dwr.engine.beginBatch();
MnoteAction.UpdateNote(mnote);
findMnotes('<s:property value="meetingId" />','meetingphase_703','<s:property value="#session.user.userId" />',2);
dwr.engine.endBatch();
document.getElementById("addTr2").style.display="none";
}
function sss(){
findMnotes(mnote.meet, function()
{
alert("完成了");
}
);
}
function updateState(eleid)
{
var noteid =eleid.substring(8);
MnoteAction.updateMnoteStateById(noteid,function(flag){
if(flag){
if(($("imgState"+noteid).src.indexOf("images/meeting/xts_zt.png"))>=0){
$("imgState"+noteid).src="images/meeting/xts_OK.png";
$("imgState"+noteid).alt="已完成";
}else{
$("imgState"+noteid).src="images/meeting/xts_zt.png";
$("imgState"+noteid).alt="設(shè)置狀態(tài)";
}
}
});
//alert(noteid);
}
function delMnote(eleid)
{
//var sel = $("years_sel").value==""?null:$("years_sel").value;
var noteid =eleid.substring(6); //delete01 delete02.. 前綴是6位
if(!confirm("您確認(rèn)要?jiǎng)h除此條信息嗎!")){
return;
}
dwr.engine.beginBatch();
MnoteAction.deleteMnoteById(noteid);
dwr.util.removeAllOptions("template0"+noteid);
MnoteAction.getMnoteList2('<s:property value="meetingId" />','meetingphase_701','<s:property value="#session.user.userId" />',
function(list){
if(list.length>0){
}else{
$("div0").style.display="block";
}
}
);
dwr.engine.endBatch();
/*
divNode1=$("tablebody0");
alert(divNode1.innerHTML);
nnote=divNode1.children("template0"+noteid);
alert(nnote.length);
nnote.removeNode(true);
divNode1.removeChild(nnote);
if(divNode1.contains(nnote)){
alert(true);
}
divNode1.removeChild(nnote);
//urnode=mnoteForm20.getElementsByTagName("ul");
urnode=divNode1.getElementsByTagName("ul");
alert(urnode.length);
if(urnode.length<=2){
$("div0").style.display="block";
}else{
alert(urnode.length);
}
*/
}
function delMnote1(eleid)
{
//var sel = $("years_sel").value==""?null:$("years_sel").value;
var noteid =eleid.substring(6); //delete01 delete02.. 前綴是6位
if(!confirm("您確認(rèn)要?jiǎng)h除此條信息嗎!")){
return;
}
dwr.engine.beginBatch();
MnoteAction.deleteMnoteById(noteid);
dwr.util.removeAllOptions("template1"+noteid);
MnoteAction.getMnoteList2('<s:property value="meetingId" />','meetingphase_702','<s:property value="#session.user.userId" />',
function(list){
if(list.length>0){
}else{
$("div1").style.display="block";
}
}
);
dwr.engine.endBatch();
}
function delMnote2(eleid)
{
//var sel = $("years_sel").value==""?null:$("years_sel").value;
var noteid =eleid.substring(6); //delete01 delete02.. 前綴是6位
if(!confirm("您確認(rèn)要?jiǎng)h除此條信息嗎!")){
return;
}
dwr.engine.beginBatch();
MnoteAction.deleteMnoteById(noteid);
dwr.util.removeAllOptions("template2"+noteid);
MnoteAction.getMnoteList2('<s:property value="meetingId" />','meetingphase_703','<s:property value="#session.user.userId" />',
function(list){
if(list.length>0){
}else{
$("div2").style.display="block";
}
}
);
dwr.engine.endBatch();
// alert('刪除成功!');
}
//-->
</script>
鼠標(biāo)停在圖片上變成小手怎么實(shí)現(xiàn)相關(guān)文章:
1.css實(shí)現(xiàn)鼠標(biāo)放到圖片上慢慢變大
2.css實(shí)現(xiàn)鼠標(biāo)移動(dòng)到圖片上,顯示圖片
3.js實(shí)現(xiàn)鼠標(biāo)移到圖片顯示文字
4.Windows7怎么將鼠標(biāo)設(shè)置為左手操作
5.word2007中實(shí)現(xiàn)圖片旋轉(zhuǎn)的四種方法