
$("form input")prop("readonly", true);\r\n将所有表单的所有表单控件的readonly全部设置为readonly~\r\n要注意的是如果直接使用input选择器的话,包括了按钮~\r\n所以要排除按钮、隐藏域之类的input的话~\r\n使用not选择器\r\n$("input:not(:button,:hidden)")prop("readonly", true);\r\n希望对您有帮助~\r\nBy Billskate
1)在Programcs中,修改Program类
using System;using SystemCollectionsGeneric;
using SystemLinq;
using SystemWindowsForms;
namespace WindowsFormsApplication1
{
static class Program
{
// 添加静态字段AppForm,用于记录启动窗体
public static Form AppForm;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
ApplicationEnableVisualStyles();
ApplicationSetCompatibleTextRenderingDefault(false);
// 用项目中的Form2作为启动窗体
AppForm = new Form2();
ApplicationRun(AppForm);
}
}
}
2)获取启动窗体
在你程序中,用以下代码获取启动窗体
Form startForm = PorgramAppForm;方法一:在EBS界面的菜单上Help--------diagnostic----examine----- Block:System Field: Last_Query Value:_this is what yuou want__ 这个方法基本能够捕捉到大部分的SQL,但是前提是当前的这个From或LOV刚过行了查询事件。之前在一次面试中问到相关的方法,只是那个时候自己还不知道这个方法。 比如:想要找到PO对应的Tax相关的取数SQL,在Oracle EBS 11i里可能不是那么容易,因为d出来的Tax界面已经另外一个Form上了(R12好像是显示在HTML上,不太记得了),我想即使把相关的From下载来分析也不是好办法,但是前面的这种方法却很轻松的获取想要的SQL语句。
方法二: 查找LOV的SQL脚本的方法。A get the session Id(SID) from the formhelp-------about oracle application-------session IdB open lov to fire the triggerC get the lov sql with the flowing sql statementSELECT spre_sql_addr,ssql_addr,tsql_textFROM v$sqltext_with_newlines t, V$session sWHERE 1 = 1 And taddress = sprev_sql_addr And ssid = v_SID(we get the SID from oracle form);稍微的组织下就是想要的SQL。
总结:1 方法一是很实用的方法,也应该是最为常用的,值得推荐。2 方法二对于LOV来说,最为适合的一种方法。
以上就是关于js获取指定form中所有表单元素谁有更好的方法全部的内容,包括:js获取指定form中所有表单元素谁有更好的方法、Winform程序中如何获取启动的那个Form对象、oracle怎样获取form里面记录等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)