如何将javscript代码转换为jquery [英] How to convert thi javscript code to jquery

查看:65
本文介绍了如何将javscript代码转换为jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function newPopss(purchasedate, supplier, tranType, payable) {
//       //alert("A")
//           MyArgs = null;
//           MyArgs = window.showModalDialog('../../Transactions/Payments/frmPaymentdetail.aspx?ComIds=1&ComOthersIds=1&HrpNo=1&BillNo=1&PurchaseDate=' + purchasedate + '&Supplier=' + supplier + '&Payable=' + payable + '&salesId=1&Transact_Type=' + tranType, MyArgs, 'status:no;dialogWidth:850px;dialogHeight:550px;dialogTop=100,dialogLeft=100;dialogHide:true;help:no;scroll:yes;resizable:No;center:yes;');

//           return  true;
//       }

//       function validateControls() {
//            alert(document.getElementById("<%=HiddenField1.ClientID %>").value)
//           if (document.getElementById("<%=HiddenField1.ClientID %>").value == "0") {
//               alert("Please Select Asset Name using Search Button ");
//               document.getElementById("<%=HiddenField1.ClientID %>").focus();
//               return false;
//           }
//           else {
//               return true
//           }






//       }

//    function openPopup1() {

//        var ParmA = " ";
//        var ParmB = " ";
//        var MyArgs1 = null;
//        var MyArgs = new Array();

//        var confirmWin = null;
//        var Emp = document.getElementById("<%=txtAssetName.ClientID %>").value;
////        if (Emp == "") {
////            alert("Please enter part of the Asset name to search corresponding Asset");
////            document.getElementById("<%=txtAssetName.ClientID%>").focus();
////            return false;
////        }

//        //MyArgs = window.showModalDialog('../Transactions/PopupEmployee.aspx?Employee='+Emp+'','007registerWindow','anycontent',MyArgs,'menubar=0,resizable=yes,dialogWidth=200,dialogHeight=500,dialogTop=100, dialogLeft=100,scrollbars=yes')

//        MyArgs1 = window.showModalDialog('../Transactions/frmCommonSearch.aspx?PageCode=ASSETM&PageName=Asset Master', MyArgs, 'status:no;dialogWidth:500px;dialogHeight:500px;dialogTop=100,dialogLeft=100;dialogHide:true;help:no;scroll:no;resizable:No;center:yes;');
//        // alert(MyArgs1)
//        MyArgs = MyArgs1.split(',');
//        // alert(MyArgs);
//        if (MyArgs == null) {
//            window.alert("No Asset Selected from the List");
//            return false;
//        }
//        else {
//            //alert(MyArgs[1].toString());
//            document.getElementById("<%=txtAssetName.ClientID %>").value = MyArgs[1].toString();
//            document.getElementById("<%=HiddenField1.ClientID %>").value = MyArgs[0].toString();

//        }

//        return true;

//    }

推荐答案

我将为您完成此操作.这是上述javascript
的jQuery等价物
I will do this for you. Here is the jQuery equivalent for the above javascript


.newPopss = 功能(购买日期,供应商,tranType,应付金额){ // 请注意,由于它已在原始Javascript代码中被注释,因此我已跳过了其余代码. });
.newPopss=function (purchasedate, supplier, tranType, payable) { // Please note that I have skipped the rest of the code since it was COMMENTED in the original Javascript code });


这篇关于如何将javscript代码转换为jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆