Title / Description
Code var selected = fmQueryResult.getSelectedRow(); //被選取的資料欄 if (selected != -1) { var fmMultiSelectedList = Form.getValue("multiSelectedList"); //這是個分號分隔的字串 (a;b;c;...) var selectedModel = fmQueryResult.getValueAt(selected, 0);//選擇的model var selectedModel = fmQueryResult.getValueAt(selected, 0) + "(" + fmQueryResult.getValueAt(selected, 1) + ")";//選擇的model var selectedStr = ";" + selectedModel + ";"; //檢查是否有加過了,需加前後分隔,避免 ";A;" 包在 ";BB;AA;" 當中~ #6274 if ((";" + fmMultiSelectedList).indexOf(selectedStr) < 0) { //do something } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code