
Разработка Web-приложений для iPhone
.pdf<*=.5"#. 2%3.45."'. 9#:%"0
Q@1$C---"*)&*"+:-$- @#,0E1"?" (&%0)E01-4 $"8&137 3"./17 -80+6 3%& ,&)&80+)&. F0)%72 ,&)&80+) ,0)03&0+ % B@1$C-=-"*)&*"+:-$ #&8 "*R0$+-+)&1(&$C-=, %+")"2 ,&)&80+)
– )0(@.6+&+7 %7,".101-4 (&,)"#&.
H%& #.@:&4 @#,0E1"?" (&%0)E01-4 $"8&13 )&(.-:&=+#4 +08, %"(%)&D&0+ -.- 10 %"(%)&D&0+ +)&1(&$C-4 )0(@.6+&+7.
L-#+-1? 2-6 ,"$&(7%&0+ #.@:&2, $"?3& $"8&13& 10 3"./1& *7.& %"(%)&D&+6 )0(@.6+&+"%.
//9#,0E1"0 V;<N'ONJMN GS!;JH
function nullDataHandler(transaction, results)
{
//'0(@.6+&+7 $"8&137 SQL 10 "/-3&=+#4, 1-:0?" 30.&+6 10 1&3"
}
+'*$'", 2-6. S*)&*"+$& @#,0E1"?" (&%0)E01-4 $"8&137 *0( "*)&*"+$- )0(@.6+&+"%
H)@?"2 #.@:&2 %"(%)&D&0+ %#0 ,".@:01170 )0(@.6+&+7 % 8#-%0 results. S#"*011"#+6= +&$"?" (&%0)E01-4 4%.40+#4 %"(8"/1"#+6 "+#@+#+%-4 )0(@.6+&+"% (1&,)-80), $1-?- # (&3&1178 ISBN 1& #$.&30 10+). < +&$"8 #.@:&0 8#-% results -800+ 3.-1@ 0.
L-#+-1? 2-7 ,"$&(7%&0+ +)0*@08@= B@1$C-=-"*)&*"+:-$.
function succsessHandler(transaction, results)
{
var len = results.rows.length; if(len==0) {
return;
}
//J@/1" "*)&*&+7%&+6 results
….
}
+'*$'", 2-7. < B@1$C-- succsessHandler +)0*@0+#4 "*)&*&+7%&+6 8#-% results.rows. H0+&.-, ,"4#14=D-0 #,"#"* "*)&*"+$- )0(@.6+&+"% *@3@+ ,)-%03017 1-/0.
2.8. B7)4#.1 4.:. /.##(;
< $&:0#+%0 ,)-80)& *@308 )#8&+)-%&+6 ,)-."/01-0, 3.4 >)&101-4 - )03&$+-)"%&1-4 1&
."$&.61"2 8&E-10 $1-? % B")8&+0 HTML. < ,)-80)&> -(@:&0+#4 ,)"#+&4 *&(& 3&117>, #"30)/&D&4 3%0 +&*.-C7: books - textbook. F0)%&4 +&*.-C& #"30)/-+ ",-#&1-0 $1-?-, %+")&4
– html +0$#+ $1-?-. A+)@$+@)& +&*.-C ,"$&(&1& 1-/0:
|
|
|
>%?7'&% BOOKS |
ISBN |
Title |
Price |
Authors |
|
|
|
|
5-93286-045-6 |
'0B&$+")-1? |
200 |
Q&@.0), !&)+-1 |
|
|
|
|
< +&*.-C0 BOOKS #"30)/&+#4 #%0301-4 " 1&(%&1-- $1-?- (Title), 00 C010 () - &%+")&>
(Authors).
>%?7'&% TEXTBOOK
21

ISBN HTMLText
5-93286-045-6 <h1>'0B&$+")-1?</h1>
< +&*.-C0 TEXTBOOK #"30)/-+#4 ,".172 HTML +0$#+ $1-?. M % ,0)%"2 - %" %+")"2 +&*.-C0 ,0)%-:178- $.=:&8- 4%.4=+#4 ,".4 ISBN. F)03,".&?&0+#4, :+" % ,)-."/01-- 8"/1" *@30+ %7*)&+6 $1-?@ ," 1&(%&1-= -.- &%+")&8, & (&+08 ,)":-+&+6 00, % HTML B")8&+0.
>'=; 0%"";@
H.4 )#8&+)-%&08"?" ,)-80)& *@3@+ -#,".6("%&+6#4 ,".4 #.03@=D-> +-,"% INTEGER, REAL, BLOB - TEXT. K+- +-,7 3&117> ,"330)/-%&0+ *)&@(0) A&B&)-.
H.4 )&*"+7 # +0$#+"%78- ,".48- <;WJS, :+"*7 $"3-)"%$& #+)&1-C *7.& @#+&1"%.01& utf-8. A0)%0) ."$&.61"2 A9UH ,"330)/-%&0+ -8011" I+@ $"3-)"%$@.
A=.4%$#4; SQL 07( *#20%"'( $%?7'&
F)-%0308 ",0)&+")7 SQL, 10"*>"3-870 3.4 #"(3&1-4 +&*.-C. A"(3&1-0 +&*.-C7 BOOKS %7,".140+#4 #.03@=D-8 ",0)&+")"8.
CREATE TABLE IF NOT EXISTS Books ( ISBN TEXT PRIMARY KEY,
Title TEXT,
Price REAL, Authors TEXT);
P&*.-C& TEXTBOOK #"(3&0+#4 +&$:
CREATE TABLE IF NOT EXISTS TextBook ( ISBN TEXT PRIMARY KEY,
HTMLText BLOB);
S#"*011"#+6= 4%.40+#4 +", :+" $&/372 -( I+-> ",0)&+")"% #"(3&0+ #""+%0+#+%@=D@= +&*.-C@ +".6$" % +"8 #.@:&0, 0#.- "1& 10 #@D0#+%@0+. P&$&4 B")8& @3"*1& 3.4 1&:&.61"2 -1-C-&.-(&C-- *&(7 3&117>, ,"#$".6$@ @8016E&0+ :-#." ,)"%0)"$. H&.00 *@30+ ,"$&(&1", $&$ %#+)&-%&+6 SQL ",0)&+")7 % javascript $"3.
2.9. <":/.#0) 0 C/.&)#0) $.4&0=
H.4 )&()&*&+7%&08"2 *&(7 3&117> 10"*>"3-8" 1&,-#&+6 B@1$C--, %7,".14=D-0 "#1"%170 302#+%-4 # +&*.-C&8-.
B"'&'%7'2%&'( ?%2; 0%"";@. C#20%"'. $%?7'&
F)"C0## -1-C-&.-(&C-- *&(7 3&117>, & 0#.- 10"*>"3-8" – #"(3&1-4 +&*.-C, %7,".140+#4 B@1$C-02 createTables(db). K+& B@1$C-4 %7,".140+ 03-1#+%011@= +)&1(&$C-=, $"+")&4 "*R03-140+ 3%0 SQL $"8&137, ,0)%&4 #"(3&0+ (0#.- 10"*>"3-8") +&*.-C@ BOOKS, %+")&4 – TEXTBOOK. P0$#+ B@1$C-- ,)-%"3-+#4 % .-#+-1?0 2-8.
/*! B-&("2345 3"7$0>' */ function createTables(db)
22
{
/* : ;3-# <"430 1',-$)52345 (+# 43105 */
db.transaction(
function (transaction) {
//C(+4@ ?-/)- ,04"3@ Javascript 8-( transaction.executeSql(
'CREATE TABLE IF NOT EXISTS Books'+
'(ISBN TEXT PRIMARY KEY,Title TEXT,Price REAL,Authors TEXT);', [], nullDataHandler, killTransaction);
//D-?")( SQL ?-/+3 7'3@ )+48-$@8- transaction.executeSql(
'CREATE TABLE IF NOT EXISTS TextBook'+ '(ISBN TEXT PRIMARY KEY,HTMLText BLOB);', [], successHandler, killTransaction);
}
);
}
+'*$'", 2-8. Q@1$C-4 createTables(db)
< $&:0#+%0 B@1$C-2-"*)&*"+:-$"% (&%0)E01-4 SQL $"8&13 -#,".6(@=+#4 nullDataHandler - successHandler ("*0 %7(7%&=+#4 ,)- @#,0E1"8 (&%0)E01-- $"8&13). Q@1$C-4-"*)&*"+:-$ killTransaction )0?-#+)-)@0+ 10@#,0E1"0 %7,".101-0 %#02 +)&1(&$C--.
<0%7."'. $%?7'&
Q@1$C-4 dropTables() ,)-%"3-+#4 3.4 ,".1"+7. S1& -#$.=:-+0.61" ,".0(1& ,)- "+.&3$0 ,)-."/01-4, 1" 8"/0+ 1&2+- ,)-80101-0 - % )&*":02 ,)"?)&880. < B@1$C-- %7,".140+#4 03-1#+%011&4 +)&1(&$C-4, $"+")&4 %7,".140+ SQL $"8&137, @3&.4=D-0 +&*.-C@ BOOKS, & (&+08 TEXTBOOK. Q@1$C-4 ,)-%"3-+#4 1& .-#+-1?0 2-9.
function dropTables(){ var db=systemDB;
if(window.confirm(":4+ 3"7$0>' 7"&' ("))'* 7A(A3 A("$+)'!" )){ db.transaction(
function (transaction) { transaction.executeSql('DROP TABLE Books;', [], nullDataHandler, killTransaction); transaction.executeSql('DROP TABLE TextBook;', [], nullDataHandler, killTransaction);
}
); alert("done");
}
else alert("E+#4310+ -3?+)+)-");
}
+'*$'", 2-9. Q@1$C-4 dropTables()
S*)&*"+:-$ 10@3&:1"?" (&%0)E01-4 SQL $"8&13 (killTransaction) %7,".140+ 302#+%-4 +&$-0 /0, $&$ - % ,)0373@D02 B@1$C-- (L-#+-1? 2-8)
2.10. D"&1 /&1 %)/.5$0%"*.#01 /.##(;
< HTML #+)&1-C0 (#8. P0$#+ 3&.00) 3.4 "+"*)&/01-4 -1B")8&C-- - (&10#01-4 3&117> % *&(@
23

-#,".6(@=+#4 +0$#+"%70 ,".4 - "*.+-. G&/3"0 ,".0 -80+ @1-$&.61"0 (1&:01-0 id, ,)- -1-C-&.-(&C-- ,)-."/01-4 I+- ,".4 ,".@:&=+ 1&:&.6170 (1&:01-4. H.4 1&?.431"#+- )03&$+-)@0870 ,".4 # @#+&1"%.01178- 1&:&.6178- (1&:01-48- ,"$&(&17 1& '-#. 2-4.
)'*. 2-4. F".4 )03&$+-)"%&1-4 $1-?-
F)-80) $"3& 3.4 1&:&.61"?" B")8-)"%&1-4 #"30)/-8"?" ,".02 ,"$&(&1 1-/0 (L-#+-1? 2-10)
function insertFirstBook(){ document.getElementById("formTitle").value="F"&1")0+"; document.getElementById("formAuthors").value="G13-.'"; document.getElementById("formPrice").value=200; document.getElementById("formBody").value="H+843"; document.getElementById("formISBN").value="ISBN"; addBook(systemDB);
}
+'*$'", 2-10. J&:&.6170 (1&:01-4
9$&(&1170 ,".4 -#,".6(@=+#4 3.4 )03&$+-)"%&1-4 - 3.4 3"*&%.01-4 1"%7> $1-?.
2.11. E"4.*&)#0) /.##(; * $.4&0=(
H.4 3"*&%.01-4 1"%"2 $1-?- % *&(@ 10"*>"3-8" (&10#+- #""+%0+#+%@=D-0 (1&:01-4 % +&*.-C7 BOOKS - TEXTBOOK. Q@1$C-4 addBook() -#,".6(@0+#4 3.4 (&10#01-4 3&117>, #:-+7%&087> -( @$&(&117> ,".02, % *&(@ (#8. L-#+-1? 2-11)
function addBook(db)
{
/* : ;3-# <"430 1',-$)52345 (+#43105 */
db.transaction(
function (transaction) {
//C(+4@ ?-/)- ,04"3@ Javascript 8-( transaction.executeSql(
'INSERT INTO Books (ISBN,Title,Price,Authors) '+ 'values (?,?,?,?);',
[document.getElementById("formISBN").value, document.getElementById("formTitle").value, document.getElementById("formPrice").value,
24
document.getElementById("formAuthors").value ],
nullDataHandler, processFatalErrorAddBook); //D-?")( SQL ?-/+3 7'3@ )+48-$@8-
transaction.executeSql(
'INSERT INTO TextBook (ISBN,HTMLText) values (?,?);', [document.getElementById("formISBN").value,
document.getElementById("formBody").value ],
processAddBook, processFatalErrorAddBook);
}
);
}
+'*$'", 2-11. H"*&%.01-0 $1-?- % *&(@ 3&117>
Q@1$C-4 addBook(db) #"30)/-+ 03-1#+%011@= +)&1(&$C-=, "*R03-14=D@= 3%0 $"8&137 INSERT. M1+0)0# % I+"2 B@1$C-- ,)03#+&%.40+ -#,".6("%&1-0 *."$& ,"3#+&1"%$- (%+")"?" ,&)&80+)& B@1$C--, B")8-)@=D02 +)&1(&$C-=). V1&:01-4, (&,-#&1170 % $&:0#+%0 I.0801+"% 8#-%& ,"#.03"%&+0.61" (&8014=+ (1&$- '?' % #+)"$0, ",)030.4=D02 $"8&13@
INSERT.
6/"9&''-#?4%?#$1'9'
H.4 80+"3"% 0ransaction.executeSql() 10"*>"3-87 B@1$C---"*)&*"+:-$- (&%0)E01-4
$"8&13 SQL. Q@1$C-- processAddBook() - processFatalErrorAddBook() ,"$&(&17 1&
.-#+-1?0 2-12.
function processAddBook(transaction,results){ reportStatus("D)0I" (-7"1$+)"" );
}
function processFatalErrorAddBook(transaction,error){ //."7-3"+3 8"8 killTransaction
reportStatus("69078", 8)0I" 4 3"80? ISBN 4AJ+431A+3." ); return true;
}
+'*$'", 2-12. H"*&%.01-0 $1-?- % *&(@ 3&117>
H.4 1&?.431"#+- %#0 ",0)&C--, %7,".140870 # -#,".6("%&1-08 *&(7 3&117>, ,)"+"$".-)@=+#4, 3.4 :0?" %%0301& B@1$C-4 reportStatus()
2.12. @4#"*&)#0) ,"/)%802"F" $.4&0=
F">"/-0 302#+%-4 %7,".14=+#4 ,)- "*1"%.01-- #"30)/-8"?" $1-?-. < B@1$C-- updateBook(db) 3.4 "*1"%.01-4 ,".02 +&*.-C #"(3&1& +)&1(&$C-4, ?)@,,-)@=D&4 :0+7)0 $"8&137. H%0 $"8&137 (DELETE) @3&.4=+ ,)0373@D@= (&,-#6, & 3%0 3)@?-0 $"8&137 (INSERT) 3"*&%.4=+ % +&*.-C@ 1"%70 ("+)03&$+-)"%&1170) (1&:01-4. L-#+-1? 2-13 ,"$&(7%&0+ I+- 302#+%-4.
function updateBook(db)
{
25
/* : ;3-# <"430 1',-$)52345 (+#43105 */
db.transaction(
function (transaction) {
//C(+4@ ?-/)- ,04"3@ Javascript 8-( transaction.executeSql(
'DELETE FROM Books WHERE ISBN=?;', [document.getElementById("formISBN").value], nullDataHandler, killTransaction);
transaction.executeSql(
'DELETE FROM TextBook WHERE ISBN=?;', [document.getElementById("formISBN").value], nullDataHandler, killTransaction);
transaction.executeSql(
'INSERT INTO Books (ISBN,Title,Price,Authors) '+ ' values (?,?,?,?);', [document.getElementById("formISBN").value, document.getElementById("formTitle").value, document.getElementById("formPrice").value, document.getElementById("formAuthors").value
],
nullDataHandler, killTransaction); transaction.executeSql(
'INSERT INTO TextBook (ISBN,HTMLText) values (?,?);', [document.getElementById("formISBN").value, document.getElementById("formBody").value
],
processUpdateBook, killTransaction);
}
);
}
+'*$'", 2-13. S*1"%.01-0 (&,-#02
6/"9&''-#?4%?#$1'9'
S*)&*"+:-$ @#,0E1"?" (&%0)E01-4 "*1"%.01-4 (&,-#02 %7?.43-+ +&$ (L-#+-1? 2-14):
function processUpdateBook(transaction,results){ reportStatus("D)0I" -7)-1$+)"" ); selectISBNs(systemDB);
}
+'*$'", 2-14. S*)&*"+$& @#,0E1"?" "*1"%.01-4
H)@?-0 B@1$C---"*)&*"+:-$- (nullDataHandler - killTransaction) *7.- %%03017 )&100.
2.13. G(4"%5. /.##(;
< ,)-80)&>, ,)-%030117> %7E0, -#,".6("%&."#6 "*)&D01-0 $ B@1$C-- (selectISBNs()), (&,)&E-%&=D02 -1B")8&C-= " $1-?&> -( UH. K+& B@1$C-4 %7?.43-+ +&$ (L-#+-1? 2-15):
function selectISBNs(db)
{
26
/* : ;3-# <"430 1'70."2345 ("))'+ 0& 3"7$0>' BOOKS*/
db.transaction(
function (transaction) {
//C(+4@ ?-/)- ,04"3@ Javascript 8-( transaction.executeSql(
'SELECT ISBN,Title FROM Books', [], processSelectISBNs, killTransaction);
}
);
}
+'*$'", 2-15. <7*")$& 3&117>
K+& B@1$C-4 %"(%)&D&0+ -( *&(7 (&,-#- " %#0> #@D0#+%@=D-> % UH $1-?&>.
6/"9&''-#?4%?#$1'9'
Q@1$C-4-"*)&*"+:-$ @#,0E1"?" (&%0)E01-4 %7*")$- -( *&(7 ,"$&(&1& 1-/0 (L-#+-1? 2-16). J&,"81-8, I+& B@1$C-4 -800+ ,&)&80+) results, $"+")72 #"30)/-+ %#0 #+)"$-, %"(%)&D01170
SQL ",0)&+")"8 'SELECT ISBN,Title FROM Books' (#8. L-#+-1? 2-15).
function processSelectISBNs(transaction,results){ var len=results.rows.length;
var slctr=document.getElementById('bookISBNSelect'); slctr.length=len;
for(var i=0;i<len;i++){ slctr.options[i].value=results.rows.item(i)["ISBN"]; slctr.options[i].text=results.rows.item(i)['Title'];
}
//S+"*)&(-+6 -1B")8&C-= " %7,".1011"2 ",0)&C-- reportStatus("B+$+83-.' 8)0I A43")-1$+)'" ); setBookInfo(bookIndex);
}
+'*$'", 2-16. S*)&*"+$& @#,0E1"?" (&%0)E01-4
F)-%03011&4 B@1$C-4 )&*"+&0+ # I.0801+"8 select, %#+)"01178 % HTML #+)&1-C@. K+"+ I.0801+ -800+ -800+ &+)-*@+
id='bookISBNSelect'
S,0)&+")7
var slctr=document.getElementById('bookISBNSelect'); slctr.length=len;
for(var i=0;i<len;i++){ slctr.options[i].value=results.rows.item(i)["ISBN"]; slctr.options[i].text=results.rows.item(i)['Title'];
}
@#+&1&%.-%&=+ (1&:01-4 (value) - ,"4#14=D-> +0$#+"% (text) I.0801+"% options. F)0/30, :08 I+- 302#+%-4 %7,".1-+6, @#+&1&%.-%&0+#4 :-#." %"(%)&D0117> (&,-#02
var len=results.rows.length;
V30#6 rows – 8#-% "*R0$+"%-#+)"$, "*R0$+& results. H&.00 % C-$.0 for @#+&1&%.-%&=+#4 (1&:01-4 options. F"#.0 I+"?" 302#+%-4 I.0801+ select, *@30+ #"30)/&+6 % ,".4> %7*")& %#0
27
1&-801"%&1-4 $1-?.
V&,-#- %-3& results.rows.item(i)["ISBN"], results.rows.item(i)['Title'] "(1&:&=+
«,".0 ISBN i-2 c+)"$- %"(%)&D011"?" 1&*")& #+)"$» - «,".0 Title i-2 c+)"$- %"(%)&D011"?" 1&*")& #+)"$» #""+%0+#+%011".
Q@1$C-4 setBookInfo(bookIndex) @#+&1&%.-%&0+ (1&:01-4 +0$#+"%7> ,".02 - "*.+02 1& HTML #+)&1-C0. H02#+%-0 I+"2 B@1$C-- (30#6 10 ,"$&(&1"
2.14. G"+%",( 5"/0%"*50 $)5,$"*
< ,)-."/01-4>, -#,".6(@=D-> UH, @#+&1"%-+0 $"3-)"%$@ utf-8. A801-+0 $"3-)"%$@ #+)&1-C7 #.03@=D-8 "*)&("8
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>test</title>
<script type="text/javascript" src=". . ." encode ="utf-8"></script>
<script type="text/javascript" src=". . ." encode ="utf-8"></script>
O&*."1 HTML #+)&1-C7 3"./01 %7?.430+6 +&$ (L-#+-1? 2-17)
<html> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>test</title>
<script type='text/javascript' src='../javascript/main.js' encode ="utf-8"> </script>
<script type='text/javascript' src='../javascript/dbSQLStore.js' encode ="utf-8"> </script>
</head>
<body onload='initDB()'> <h1>Database Examples</h1>
How to open or create Database </body>
</html>
+'*$'", 2-17. O&*."1 # @#+&1"%.011"2 $"3-)"%$"2 utf-8
'&100 %",)"# $"3-)"%$- @/0 "*#@/3&.#4. < ,)-."/01-4>, )&*"+&=D-> # ."$&.6178- *&(&8- 3&117>, +&$&4 @#+&1"%$& "*4(&+0.61&.
2.15. D%",2"$% 4.: /.##(; 7)%): 4%.C:)%
G"8,&1-4 Apple 3.4 ,"330)/$- ,)"C0##& )&()&*"+$- *)&@(0)"% 1"%"?" ,"$".01-4, )0&.-(@=D-> %"(8"/1"#+- #,0C-B-$&C-2 HTML 5 - )0$"8013&C-2 $"1#")C-@8& w3c, 1&:&.& - )&(%-%&0+ ,)"0$+ WEB Kit. K+"+ ,)"0$+ (*0#,.&+1" 8"/1" (&?)@(-+6 ,)"?)&881"0 "*0#,0:01-0 # #&2+& http://nightly.webkit.org (#8. )-#)) ,)03"#+&%.40+ )&()&*"+:-$&8 @3"*1@= #)03@ 3.4 "+.&3$- - #",)"%"/301-4 ,)-."/01-2, -#,".6(@=D-> *)&@(0) A&B&)-.
28

)'*. 2-5. A&2+ - ."?"+-, ,)"0$+& WEB Kit
D4#*:#$4 $%?7'& 1.4.2 ?4%/2.4
N#.- (&,@#+-+6 )&()&*&+7%&08"0 ,)-."/01-0 :0)0( WEBKit, +" -#,".6(@08&4 ,)-."/01-08 *&(& 3&117> *@30+ #"(3&1& - 00 #"30)/-8"0 8"/1" *@30+ ,)"#8&+)-%&+6 ()-# 2-6)
)'* 2-6. F)"#8"+) +&*.-C7 Books
WEBKit "+$)7%&0+ 3.4 )&*"+7 # WEB 3"$@801+&8- A&B&)-. 5+"*7 ,".@:-+6 3"#+@, $ $"1#".- 1@/1" %"#,".6("%&+6#4 801= Develop - %7*)&+6 ,@1$+ Develop>Error Console.
E#2:#F"#*$8 3;=#7"."'( 2%=4#*#3
G"1#".6 "E-*"$ 3&0+ %"(8"/1"#+6 10,"#)03#+%011"?" %7,".101-4 $"8&13 SQL. 5+"*7 %7,".1-+6 $"8&13@, 1@/1" %730.-+6 +)0*@08@= *&(@ 3&117>, & (&+08 %%0#+- +)0*@08@=
29

$"8&13@ % .0%"8 "$10 $"1#".- 8"1-+")& *&(7 3&117> ()'*. 2-7).
)'*. 2-7. <7*")$& 3&117> -( +&*.-C
P&$"2 )0/-8 )&*"+7 # *&(&8- 3&117> ":016 @3"*01, "#"*011" 3.4 "+.&3$- #."/17> (&,)"#"%.
2.16. B/.&)#0) 0#H"%2.=00 " 5#0F) 0: 4.:(
H.4 @3&.01-0 $1-?- -( *&(7 10"*>"3-8" 1&,-#&+6 "+30.61@= B@1$C-=. S1& 3"#+&+":1" ,)"#+&, +&$ $&$ -#,".6(@0870 % 102 (&,)"#7 )0(@.6+&+"% 10 %"(%)&D&=+. L-#+-1? 2-18 ,"$&(7%&0+ +)0*@0872 $"3.
function deleteBook(db)
{
/* : ;3-# <"430 1',-$)52345 (+#43105 */
db.transaction(
function (transaction) {
//C(+4@ ?-/)- ,04"3@ Javascript 8-( transaction.executeSql(
'DELETE FROM Books WHERE ISBN=?;', [document.getElementById("formISBN").value], nullDataHandler, killTransaction);
transaction.executeSql(
'DELETE FROM TextBook WHERE ISBN=?;', [document.getElementById("formISBN").value], processDeleteBook, killTransaction);
}
30