---
title: "前端代码收集"
author: "rox"
date: "2012-07-15T14:58:55Z"
tags: []
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2012-07-15T14:58:55Z"
id: 1391873
url: "https://rox.iteye.com/blog/1391873"
---

前端的代码是这么写的：

1、对象空检查并执行

```
iframe && iframe.attr("src", url);
```

 

2、超链不跳顶部

 

```
<a href="###" onclick="doSomeThing()">test</a>
```