如何重写 ACTION A ,以便能够根据HTML onClick事件传递的值进行操作。
行动A
$("#bt").click(function() {
var diagonalScl;
var txSiz;
$("#aTextDV1").resizable({
alsoResize: '#aText',
create: function(ui) {
diagonalScl = diagonalSwItms();
txSiz = parseInt($("#aText").css("font-size"));
},
resize: function(ui) {
var diagonalSclNw = diagonalSwItms();
var ratio = diagonalSclNw / diagonalScl;
$("#aText").css("font-size", txSiz + ratio * 10);
}
});
});
示例(假设onClick已触发myfunc(passedVal)
)
function myfunc(passedVal){
var diagonalScl;
var txSiz;
$("#"+passedVal).resizable({
//so on...