<!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">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<style type="text/css"> </style>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
window.onload=function(){
$('#btnOk').click(function(){
$('font:first').attr('color','red');
});
};
</script>
</head>
<body>
<font color='#336699'> typeface 10</font>
<hr />
<font> typeface 2</font>
<hr />
<input type="button" id='btnOk' value=' determine ' />
</body>
</html>

jquery practice ( Assign attribute values ) More articles about

  1. jQuery The problem of getting tag property values

    jquery attr() Unable to get property value. Problem css Liming has already set up : But I still can't get : Seek guidance .   It must be undefined,attr It is used to get or set label properties , Not to get CSS Attribute . If you ...

  2. jquery Set up attr Property value

    1. Return property value $(selector).attr(attribute); 2. Setting property values $(selector).attr(attribute,value); 3. Set multiple attribute values $(selector ...

  3. jquery Remove property values

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. jquery practice ( Assign multiple attribute values at once )

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. 11 month 8 On the afternoon of Sunday Jquery Take the attribute value ( Check box 、 The drop-down list 、 Radio button )、 Make the select all button 、JSON Storage 、 Go to space

    1.jquery Take the value of the check box <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt ...

  6. jQuery Take the value of the check box 、 Attribute values in the drop-down list 、 Take the property value of radio button 、 Select all button 、JSON Storage 、* Go to space

    1.jquery Take the value of the check box <!-- introduce jquery package --> <script src="../jquery-1.11.2.min.js"></scri ...

  7. JQuery Operate on the property values of the object

    adopt JQuery To operate the foreground object (div,span...) It's a very common thing to have the attributes of , This paper simply introduces several operation situations . 1): Get objects through property values 2): use JQuery To modify the property values of an object 3): Get and modify the ...

  8. jquery attr() Method add to , modify , Gets the property value of the object .

    jquery attr() Method add to , modify , Gets the property value of the object . jquery of use attr() Method to get and set element properties ,attr yes attribute( attribute ) Abbreviation , stay jQuery DOM It's often used in operation ...

  9. jquery adopt name Property value method

    jquery adopt name Property value method //$("input[name='imgtitle']").val();// This can only get the first value // adopt each Function to get all input Value v ...

Random recommendation

  1. SQLite File view tool DB Browser for SQLite

    occasionally , We use it Python Created a test.sqlite file , Want to see the data inside , In addition to using Python Connect to the database ,SELECT come out , What's the best way ? Here's a little tool DB Browser for ...

  2. uva 1422 - Processor( Two points + Priority queue )

    Topic link :uva 1422 - Processor The main idea of the topic : There is a machine to deal with some problems , Give the time when these problems can start and must be completed , And the workload of the task , How much work does the machine have to do per second to accomplish these tasks ...

  3. ( turn )ASP.NET Disable refresh duplicate commit Backspace key

    In web page making , because Backspace Key to go back to the previous page , Using cached data , And that leads to some mistakes . The browser's back button allows us to easily return to previously visited pages , It's certainly very useful . But sometimes we have to shut it down ...

  4. be based on ACE Timer template class for

    ACETimerClockGenerator.h ClockGeneratorIF.h Define a structure in a class , Define a function in the structure . Define a function in the structure , What's good about that ? TimerHandl ...

  5. winform The acquisition of relative path and absolute path in

    for example : Path.GetFullPath(Path.Combin(@"C:\a\b\c","..\b.text")); .. On behalf of the parent directory . Represents the current directory result : ...

  6. Css send div The tag sinks to the bottom of the page

    .footer{ position:fixed; bottom:0; } Use these two tags to achieve the effect

  7. python yield generator Detailed explanation

    This article will introduce in detail yield as well as generator, Including the following : what generator, Generate generator Methods ,generator Characteristics ,generator Basic and advanced application scenarios ,genera ...

  8. Generator The right way to open

    A lot of writing in the last two years Generator+co, Use it to write code similar to synchronization, but actually ,Generator It's not made for this , Otherwise, there will be no later async.await 了 Generator It's one that can be suspended ...

  9. P4178 Tree( Point divide and conquer )

    The requirement is less than or equal to K Number of paths for , We naturally thought of a point of divide and conquer ( No, just poke me ) The statistical answer to this question is different from the template question in that it is equal to K To less than or equal to K Then we can add each child node to the current root ( Focus ) Distance ordering of , And then use something like a double pointer ...

  10. ThinkPHP Database operation ( 3、 ... and ) : Query methods 、 The query syntax 、 Chain operation

    Query methods Condition query method where Method have access to where methods AND Conditions of the query : Db::table('think_user') ->where('name','like','%th ...