---
title: "var load = function(url,component){ \t$.ajax({ \t\turl:url, \t\tsuccess:function(resp"
author: "gongmingwind"
date: "2012-03-20T15:45:34Z"
tags: []
categories: ["Web前端"]
slug: "var-load-function-url-component-ajax-url-url-success-function-resp"
draft: false
lastmod: "2012-03-20T15:45:16Z"
id: 1458711
url: "https://gongmingwind.iteye.com/blog/1458711"
---

```java
var load = function(url,component){
	$.ajax({
		url:url,
		success:function(response){
			$("#"+component).html(response);
		}
	});

}
```