Kill Thunder Dog jquery---11 property operations

Source: Internet
Author: User

<!DOCTYPE HTML><HTML>    <Head>        <MetaCharSet= "Utf-8">        <title></title>                <Scriptsrc= "Js/jquery.js"></Script>        <Script>window.onload= function(){                $('#btnok')[0].onclick= function(){                    //1. Get the SRC attribute of the img tag                    //Alert ($ (' img '). attr (' src '));                    //2. Setting the value of a property                    //$ (' img '). attr (' src ', ' images/2.jpg ');                /*//3. Set multiple properties for IMG at the same time var data = {src: ' images/1.jpg ',                    Width: ' 150px ', Height: ' 190px '};                $ (' img '). attr (data); */                    //4. Setting element properties by return value of a function                /*$ (' img '). attr (' src ', function () {//return ' images/' + random number + '. JPF ';                    Return ' images/' +math.ceil (Math.random () *54) + '. jpg ';                }); */                    //5. Removing attributes from an element                    $('img'). Removeattr ('src'); }            }        </Script>    </Head>    <Body>        <inputtype= "button"ID= "Btnok"value= "Property Action" />        <HR/>        <imgsrc= "Images/1.jpg" />        <ul>            <ol></ol>        </ul>    </Body></HTML><?PHP Header ("Content-type:text/html;charset=utf-8");

Kill Thunder Dog jquery---11 property operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.