Bug Tracker

Ticket #4019: test-case-1.html

File test-case-1.html, 957 bytes (added by Maaack, 13 years ago)

Example with alerts to show the result of html() on each object.

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4        <head>
5                <title>Test-Case-1
6                </title>
7                <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8                <script src="js/jquery-1.3.1.min.js" type="text/javascript">
9                </script>
10                <script type="text/javascript">
11$(document).ready(function(){
12        var htmlobject = $("html");
13        var html = htmlobject.html();
14        alert("body = "+$("body",html).html());
15        alert("body = "+$("body",htmlobject).html());
16        alert("form = "+$("form",html).html());
17        alert("form = "+$("form",htmlobject).html());
18        alert("div = "+$("div",html).html());
19        alert("div = "+$("div",htmlobject).html());
20});
21                </script>
22
23        </head>
24        <body>
25        <div class="content">1st<form id="formid" name="formname" action="./user.php?some=1">Form information
26        </form>
27        </div>
28        <div>2nd</div>
29        <div>3rd<div>4th</div></div>
30        </body>
31</html>