`
t2w
  • 浏览: 8960 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

js example

阅读更多
<table>
<tr>
<td id="billing_${billingId}"  onmouseover="try{EditorMgr.toggleEditBtn(this,true);}catch(e){}" onmouseout="try{EditorMgr.toggleEditBtn(this,false);}catch(e){>
               <span class="normalBox">
               <span class="dataPanel" id="statusDataPanel">
<s:if test="status==0">
已扣款
</s:if>
<s:if test="status==1">
未扣款
</s:if>
<s:if test="status==2">
扣费失败
</s:if>
               </span>
               <span title="编辑" class="editBtn" onclick="EditorMgr.changeToEdit('statusDataPanel')">ddd</span>
               </span>
<span class="editBox">
<span class="editPanel">
<select id="status" name="status">
<option value="0">已扣款</option>
<option value="1">未扣款</option>
<option value="2">扣费失败</option>
</select>
</span>
<span class="saveBtn" title="保存" onclick=""></span>
             <span class="cancelBtn" title="取消" onclick=""></span>
             </span>
</td>
</tr>
</table>


.item-field-over .normalBox .editBtn{display:inline;}
.item-field-editMode .normalBox{display:none;}
.item-field-editMode .editBox{display:inline;}
.dataPanel .editPanel{float:left;}
.editBtn .saveBtn .cancelBtn{margin:0 10px 0 5px;width:16px;height:16px;float:left;}
.editBtn{background:url(../images/btn_login.png) 10px 10px no-repeat;}
.saveBtn{background:url(../images/btn_login.png) 10px 10px no-repeat;}
.cancelBtn{background:url(../images/btn_login.png) 10px 10px no-repeat;}
.editPanel input.rejigger{height:14px;padding:0;margin:0;color:#105E8F;size:10px;}
.hidden{display:none;}
.show{display:block;}
.inline{display:inline;}


var EditorMgr=
{
options:{overCls:"item-field-over",editCls:"item-field-editMode"},
toggleEditBtn:function(tdEl,flg)
{
tdEl=$(tdEl);
if(tdEl)
{
  var f=flg;
  alert(f);
  if(f)
  {
    tdEl.addClass(this.options.overCls)
  }
  else
  {
    tdEl.removeClass(this.options.overCls)
  }
}
},
changeToEdit:function(id)
{
alert(id);
var tdEl=$(id);
alert(tdEl);
if(tdEl)
{
  tdEl.removeClass(this.options.overCls).addClass(this.options.editCls)
}
},
changeToNormal:function(id)
{
alert(id);
var tdEl=$(id);
alert(tdEl);
if(tdEl)
{
  tdEl.addClass(this.options.overCls).removeClass(this.options.editCls)
}
},
onFail:function(msg,id)
{
alert("onFailonFailonFailonFailonFail++++");
},
cancelChange:function(id)
{
alert("cancelChangecancancelChangecancelChange++++");
this.changeToNormal(id)
},
saveChange:function(id)
{
alert("saveChangesaveChangesaveChangesaveChange++++");
},
updateData:function(id,value)
{
alert("updateDataupdateDataupdateDataupdateData++++");
}
};

分享到:
评论

相关推荐

    premage.js Example

    "premage.js Example"是一个基于JavaScript的项目,其主要目的是实现本地图片的预览功能。在Web开发中,用户在上传图片前能够预览是非常重要的用户体验优化,它可以帮助用户确认他们选择的图片是否符合预期。premage...

    js example积累

    "js example积累"这个标题表明我们即将探讨的是关于JavaScript的一些实用示例和经验积累,这对于初学者和有经验的开发者来说都是宝贵的资源。在这个压缩包文件中,可能包含了各种JavaScript的代码片段、实验项目或...

    JS example:点击按钮table增加一行,删除一行

    在JavaScript(JS)中,动态地向HTML表格添加或删除行是一项常见的操作,尤其是在构建交互式用户界面时。这篇博客“JS example:点击按钮table增加一行,删除一行”提供了具体的示例,帮助开发者掌握这一技能。 ...

    thrift javascript example

    在这个"thrift javascript example"中,我们将深入探讨如何使用JavaScript与Thrift进行通信。首先,你需要理解Thrift的基本概念: 1. **IDL(Interface Definition Language)**: Thrift使用一种类似C++的语法来...

    Node.js By Example

    《Node.js By Example》是一本深入浅出介绍Node.js技术的书籍,作者是Krasimir Tsonev。这本书通过丰富的示例,旨在帮助读者快速掌握Node.js的核心概念和实际应用。Node.js是一种基于Chrome V8引擎的JavaScript运行...

    [pdf]Ext JS 6 By Example

    一本国外牛人写的关于 ExtJS 6 的电子书 [Ext JS 6 By Example]。这份资料在 PACKT上卖 35.99 刀的,讲的很详细,例子也比较简单,容易理解,现我准备利用工作之余翻译这份文档,为自己学习加深理解,也希望能帮助更...

    Ext JS 6 By Example

    Ext JS 6 By Example英文版 属于自己找了半天,结果还是发现原版中没有记录,网页上图裂的那部分是大佬自己理解加上去的,尴尬,但是还是把原版的资源放在这里吧,如果是为了翻译版网页上图裂的那部分想看原图的,...

    example.js

    example.js

    Ext JS 6 by Example翻译

    **Ext JS 6 by Example 翻译** Ext JS 是一个功能强大的JavaScript框架,用于构建交互式的、数据驱动的Web应用程序。它提供了丰富的组件库,包括表格、图表、菜单、工具栏、窗体等,使得开发者可以快速创建复杂的...

    Node.js.By.Example.1784395714.epub

    Node.js By Example covers Node.js fundamentals and teaches you how to use its technology to architect a project. It shows you how to manage an application's assets and how to implement the Model-View-...

    ArcGIS for JavaScript Developers by Example 配套源码

    ArcGIS for JavaScript Developers by Example 配套源码,很多朋友反应说 packtpub 网站无法注册,没办法下载书本代码,故搬运回 CSDN ,学习 GIS 的朋友可以参考下。

    Oryx&Ext example

    Oryx 加上 Ext 修改范例,实现在oryx上添加tab窗体

    Chartjs-example

    Chart.js 是一个轻量级的JavaScript库,专用于创建各种类型的图表,如条形图、饼图、线图等。这个"Chartjs-example"项目提供了一个简单的图表示例,帮助开发者了解如何在HTML页面中使用Chart.js库来绘制数据可视化...

    D3.js By Example(PACKT,2015)

    This book will take you through all the concepts of D3.js starting with the most basic ones and progressively building on them in each chapter to expand your knowledge of D3.js. Starting with ...

    vue-example:Vue.js示例

    Vue.js是一种轻量级的前端JavaScript框架,以其易学易用和灵活性著称。这个"vue-example"项目是一个专门展示Vue.js应用实例的资源,它旨在帮助开发者更好地理解和实践Vue.js的核心特性,以及如何与其他现代构建工具...

    threejs-example:Three.js 的简单例子

    在 "threejs-example" 中,你可能会看到一系列的示例项目,每个项目通常包含以下几个部分: 1. **HTML 文件**:HTML 文件是网页的基础,它包含了页面的结构和引用的资源,如 Three.js 库和其他脚本文件。 2. **CSS ...

Global site tag (gtag.js) - Google Analytics