首页 > 语言 > JavaScript > 正文

jQuery中removeProp()方法用法实例

2024-05-06 14:48:00
字体:
来源:转载
供稿:网友

本文实例讲述了jQuery中removeProp()方法用法。分享给大家供大家参考。具体分析如下:

此方法可以删除由prop()方法设置的属性。

语法:
代码如下:$("selector").removeProp(name)

参数列表:

参数 描述
name 定义要要删除的属性名称。

实例:

实例一:

代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="//www.Vevb.com/" />
<head>
<title>错新站长站</title>
<script type="text/javascript" src="mytest/jQuery/jquery-1.8.3.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
       $("td").prop({width:"200",height:"300"});

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选