Jump to content

buitrongkhiem

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About buitrongkhiem

  • Rank
    Newbie
  • Birthday 10/20/1990

Previous Fields

  • Languages
    Viet Nam

Contact Methods

  • Website URL
    http://muabannhagiare.nhatnghe.org/trang-chu-mua-ban-nha-gia-re.php
  • Yahoo
    buitrongkhiem2010@yahoo.com

Profile Information

  • Location
    Ho Chi Minh
  • Interests
    web, football, walk alone
  1. thank u so much, it really helpful for me
  2. oh. thank u so much, i don't see that, i'm beginner, i hope i learn php easy ^^
  3. Hello everybody,i have a question? i search some ways to security my website, i see sqj injection! would u like to explain it for me? Thank u so much
  4. Yes, i think so!it work all of browsers
  5. the first text field has data,but another text filed,them haven't data,i want to after the loop,output one text field and one data,and repeat until data of the end
  6. code : loadxmlDoc:// JavaScript Documentfunction loadXMLDoc(quanlythuebao){ //tạo request lên severif (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); } xhttp.open("GET","quanlythuebao.xml",false);xhttp.send();return xhttp.responseXML;} code process: <!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>form customer managerment</title><style>body{background-image:url(metal_background.jpg);background-position:center;background-attachment:fixed;}table{background-image:url(ima.jpg);width:1000px;}#qlkh{MARGIN:auto;background-repeat:repeat;text-align:center;width:1200px;height:200px;}</style><script language="javascript" src="jquery-1.5.2.min.js"></script><script language="javascript" src="loadXMLDoc.js"></script><script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script></head><body><script language="javascript">$(document).ready(function (){//tên thuê baoxmlDoc = loadXMLDoc("quanlythuebao.xml");$('tr#dongmoi').hide();x = xmlDoc.getElementsByTagName("tenthuebao");for (i=0;i<x.length;i++) { a = x[0].childNodes[0].nodeValue;document.getElementById("name").value = a;aa = x[1].childNodes[0].nodeValue;document.getElementById("name").value = aa;aaa = x[2].childNodes[0].nodeValue;document.getElementById("name").value = aaa; }//số thuê baox = xmlDoc.getElementsByTagName("sothuebao");for (i=0;i<x.length;i++) { b = x[0].childNodes[0].nodeValue; document.getElementById("phonenumber").value = b; }//giới tính x = xmlDoc.getElementsByTagName("gioitinh");for (i=0;i<x.length;i++) { c = x[0].childNodes[0].nodeValue; document.getElementById("######").value = c; } x = xmlDoc.getElementsByTagName("ngaysinh");for (i=0;i<x.length;i++) { d = x[0].childNodes[0].nodeValue; document.getElementById("date").value = d; } x = xmlDoc.getElementsByTagName("diachi");for (i=0;i<x.length;i++) { e = x[0].childNodes[0].nodeValue; document.getElementById("address").value = e; } x = xmlDoc.getElementsByTagName("tuoi");for (i=0;i<x.length;i++) { f = x[0].childNodes[0].nodeValue; document.getElementById("age").value = f; } x = xmlDoc.getElementsByTagName("nghenghiep");for (i=0;i<x.length;i++) { g = x[0].childNodes[0].nodeValue; document.getElementById("job").value = g; } x = xmlDoc.getElementsByTagName("hinhthuctb");for (i=0;i<x.length;i++) { h = x[0].childNodes[0].nodeValue; document.getElementById("type").value = h; } $('input[name=checkall]').click(function (){var status = this.checked;//sử dụng mô hình dom dùng this.attribute//mỗi thẻ input name = chon sẽ thực hiện 1 function thông qua hàm each()$('input[name=check]').each( function (){ this.checked= status; //set checked cho tất cả các thẻ input còn lại });});$('#them').click(function (){$('#dongmoi').toggle(1000);});$('input[name=name]').append('asdasd')});</script><form action="" method="get"><div id="qlkh" ><script type="text/javascript">AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','1200','height','200','src','banner','quality','high','wmode','transparent','pluginspage','http://www.macromedia.com/go/getflashplayer','allowscriptaccess','always','movie','banner' ); //end AC code</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1200" height="200"> <param name="movie" value="banner.swf" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="always" /> <param name="wmode" value="transparent"> <embed src="banner.swf" quality="high" type="application/x-shockwave-flash" WMODE="transparent" width="1200" height="200" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" /></object></noscript></div><table width="1000" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#9933FF"> <tr> <td colspan="7" align="left" valign="top"><label>Search for: <select name="select" id="select"> <option value="1">Name of customer</option> <option value="2">Customer code</option> <option value="3">######</option> </select> <input type="text" name="textsearch" id="textsearch" width="150px" /> <label> <input type="button" name="btntim" id="btntim" value="Search" /> <input type="reset" name="btnreset" id="btnreset" value="Reset" /> </label></td> <td width="204" colspan="2" align="left" valign="top"><input type="button" name="them" id="them" value="Add/Cancel" /> <input type="button" name="xoa" id="xoa" value="Delete" /> <input type="button" name="sua" id="sua" value="Edit" /></td> </tr> <tr align="left" valign="top"> <td colspan="9"> </td> </tr> <tr align="left" valign="top"> <td><label> <input type="checkbox" name="checkall" id="checkall" /> </label></td> <td >First and last name:</td> <td>######:</td> <td>Birth day:</td> <td>Address:</td> <td>Phone number:</td> <td >Age:</td> <td>Type:</td> <td>Job:</td> </tr> <tr align="left" valign="top"> <td><input name="check" type="checkbox" id="check" value="1" /></td> <td> <input name="name" type="text" id="name" width="200px" /> </td> <td><input name="######" type="text" id="######" size="4" maxlength="5" width="30px" /></td> <td> <input type="text" name="date" id="date" maxlength="11" size="10" width="70px" /> </td> <td><input name="address" type="text" id="address" value="" size="58" maxlength="58" width="257px" /></td> <td><input type="text" name="phonenumber" id="phonenumber" width="70px" maxlength="13" size="13" /></td> <td><input type="text" name="age" id="age" maxlength="3" size="3" width="40px" /></td> <td><input name="type" type="text" id="type" size="20" maxlength="20" width="20px" /></td> <td><input name="job" type="text" id="job" size="20" maxlength="20" /></td> </tr> <tr align="left" id="dongmoi" valign="top"> <td><input name="check" type="checkbox" id="check" value="1" /></td> <td><input name="name" type="text" id="name" width="200px" /></td> <td><input name="######" type="text" id="######" size="4" maxlength="5" width="30px" /></td> <td><input type="text" name="date" id="date" maxlength="11" size="10" width="70px" /></td> <td><input name="address" type="text" id="address" value="" size="58" maxlength="58" width="257px" s="58" /></td> <td><input type="text" name="phonenumber" id="phonenumber" width="70px" maxlength="13" size="13" /></td> <td><input type="text" name="age" id="age" maxlength="3" size="3" width="40px" /></td> <td><input name="type" type="text" id="type" size="20" maxlength="20" width="20px"/></td> <td><input name="job" type="text" id="job" size="20" maxlength="20" /></td><td><input type="button" value="ok"name="ok" id="ok" /></td> </tr></table></form></body></html> code xml: <?xml version="1.0" encoding="utf-8" ?><quanlythuebao> <khachhang makh="1"> <tenthuebao>Võ Hoàng Tuấn Linh</tenthuebao> <sothuebao>01223456789</sothuebao> <gioitinh>nam</gioitinh> <ngaysinh>10/11/2002</ngaysinh> <nghenghiep>Giám đốc</nghenghiep> <tuoi>22</tuoi> <socmnd>213131231311</socmnd> <diachi>3/2 lang bac ho</diachi> <hinhthuctb>tra truoc</hinhthuctb> </khachhang> <khachhang makh="2"> <tenthuebao>Bùi Trọng Khiêm</tenthuebao> <sothuebao>01223456789</sothuebao> <gioitinh>nam</gioitinh> <ngaysinh>11/11/2011</ngaysinh> <nghenghiep>Chủ tịch</nghenghiep> <tuoi>22</tuoi> <socmnd>213100223961</socmnd> <diachi>3/2 lang bac ho</diachi> <hinhthuctb>tra truoc</hinhthuctb> </khachhang> <khachhang makh="3"> <tenthuebao>Nguyễn Thị Kim Lý</tenthuebao> <sothuebao>01223456789</sothuebao> <gioitinh>nữ</gioitinh> <ngaysinh>20/1/2001</ngaysinh> <nghenghiep>Osin cao cấp</nghenghiep> <tuoi>22</tuoi> <socmnd>213199991</socmnd> <diachi>3/2 lang bac ho</diachi> <hinhthuctb>tra truoc</hinhthuctb> </khachhang></quanlythuebao>
  7. i have xml file . i use javascript,i got value of the node,but i want to set it in my object(text field,tag...)the first node, i set it in my text field , but the second node,i can't set it in my text field,i loop the value of the node to get value of node.please help me.
  8. i have a document :<book> <language> <en>english</en> <sp>spain</sp> </language></book>i want to remove or edit <language> node and create a new node with javascipt(or jquery) but i don't know how?every one help me.please.
  9. ya,Thank you so much.Now,i see
  10. i have a xml document: <bookstore><book category="COOKING"><title lang="en">Everyday Italian</title><author>Giada De Laurentiis</author><year>2005</year><price>30.00</price></book><book category="CHILDREN"><title lang="en">Harry Potter</title><author>J K. Rowling</author><year>2005</year><price>29.99</price></book><book category="WEB"><title lang="en">XQuery Kick Start</title><author>James McGovern</author><author>Per Bothner</author><author>Kurt Cagle</author><author>James Linn</author><author>Vaidyanathan Nagarajan</author><year>2003</year><price>49.99</price></book><book category="WEB"><title lang="en">Learning XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price></book></bookstore> and has a javascript code <html><body><script type="text/javascript">if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","books.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; x=xmlDoc.getElementsByTagName("book");for(i=0;i<x.length;i++) { x[i].setAttribute("edition","first"); }//Output all attribute valuesfor (i=0;i<x.length;i++){document.write("Category: " + x[i].getAttribute('category') + "<br />");document.write("Edition: " + x[i].getAttribute('edition') + "<br />");}</script></body></html> i don't understand 2 sentences:{document.write("Category: " + x.getAttribute('category') + "<br />");document.write("Edition: " + x.getAttribute('edition') + "<br />");}help me!please!!!!
×
×
  • Create New...