---
title: "jQuery.proxy可以往函数里传参"
author: "Nonkr"
date: "2013-08-06T10:33:05Z"
tags: []
categories: ["Web前端"]
slug: "jquery-proxy"
draft: false
lastmod: "2013-08-06T10:33:05Z"
id: 1920776
url: "https://nonkr.iteye.com/blog/1920776"
---

```
for (j = td_counter; j < rows; j++) {
    td = document.createElement("td");
    td.innerHTML = '&nbsp;';
    td.onclick = $.proxy(this.onclick, this, i);
    tr.appendChild(td);
}
```