CRM 窗体定制技巧和代码
来源:互联网 发布:中国的软件 编辑:程序博客网 时间:2024/05/24 06:48
给大家共享一些经常用到的一些crmForm窗体定制技巧和代码:
1. 改变lable的样式(加粗,变色,大小)
/* change new_button field label style */
if (crmForm.all.new_button != null)
{
var field = crmForm.all.new_button_c;
field.style.fontWeight = 'bold'; // change font to bold
field.style.fontSize = '12px'; // change font size
field.style.color = '#ff0000'; //change font color
}
if (crmForm.all.new_button != null)
{
var field = crmForm.all.new_button_c;
field.style.fontWeight = 'bold'; // change font to bold
field.style.fontSize = '12px'; // change font size
field.style.color = '#ff0000'; //change font color
}
2. 把输入框替换成图片
/* replace new_button_d to a button */
if (crmForm.all.new_button != null)
{
var field = crmForm.all.new_button_d;
var html = "<table border='0' cellspacing='0' cellpadding='0'><tr><img width='32' height='32' style='cursor:hand' src='/_imgs/ico_32_134.gif' alt='Click button' onclick='Button_OnClick()' /></tr></table>";
field.innerHTML = html;
}
Button_OnClick = function()
{
alert("button clicked!");
}
if (crmForm.all.new_button != null)
{
var field = crmForm.all.new_button_d;
var html = "<table border='0' cellspacing='0' cellpadding='0'><tr><img width='32' height='32' style='cursor:hand' src='/_imgs/ico_32_134.gif' alt='Click button' onclick='Button_OnClick()' /></tr></table>";
field.innerHTML = html;
}
Button_OnClick = function()
{
alert("button clicked!");
}
3. 把输入框替换成文本(使用replaceNode技术)
/* replace new_button_d to a label */
if (crmForm.all.new_button != null)
{
var html = document.createElement( "<TD id='new_button_d'>");
html.innerText = "this is a lable";
crmForm.all.new_button_d.replaceNode(buttonText);
}
if (crmForm.all.new_button != null)
{
var html = document.createElement( "<TD id='new_button_d'>");
html.innerText = "this is a lable";
crmForm.all.new_button_d.replaceNode(buttonText);
}
4. 附加一个文本(无需新建attribute,直接用html绘出)
/* append text under new_button */
if(crmForm.all.new_button != null)
{
var html= document.createElement( "<LABEL>");
html.innerText = "this is a text field";
crmForm.all.new_button.parentNode.appendChild(html);
}
if(crmForm.all.new_button != null)
{
var html= document.createElement( "<LABEL>");
html.innerText = "this is a text field";
crmForm.all.new_button.parentNode.appendChild(html);
}
- CRM 窗体定制技巧和代码
- winform技巧—窗体抖动代码
- RCP-定制-空白窗体
- 代码定制
- 通用型CRM还是行业型CRM?-定制为王
- 常用代码和技巧
- Vtiger CRM 动态菜单的定制方法
- 定制CRM需要做哪些准备?
- crm代码片段
- CRM代码片段
- crm代码评审学习
- crm使用url打开窗体视图
- 代码规范和一些技巧
- CRM和一对一[转]
- Salesforce和CRM
- ECIF和CRM
- 8020规则和CRM
- 电子商务和CRM相辅相成
- Working with Microsoft Dynamics™ CRM 4.0
- Microsoft® Dynamics™ CRM 4.0 and Microsoft Dynamics Live CRM Step by Step
- Microsoft Dynamics CRM 4.0 roadmap
- 有趣的telnet命令
- AttachEvent带参数的使用例子
- CRM 窗体定制技巧和代码
- 创建CRM图形报表的几种方法
- CRM: 创建CheckBox样式的下拉列表
- CRM 4.0 报表代码示例
- 在CRM 4.0 里用导入向导功能更新数据
- 国内外节日大全 (时间+来历)
- Microsoft Dynamics CRM 4.0 SDK Released!
- 简述关于软件加密软件注册通用技术
- c#2008数据库——从入门到精通