1表单提交方式
<form>
.....
<input type = "submit"/>
</form>
- 使用
button提交表单
-代码
function form1() {
//获取from
var form1 = document.getElementById("form1");
//设置action
form1.action = "hellow.html";
//提交form表单
form1.submit();
- 使用超链接提交
-代码
<a href="hellow.html?username = 123456">使用超链接提交</a>
onclick鼠标点击事件
onchange改变内容(一般和select一起使用)
onfocus得到焦点
onclur失去焦点
-代码
<input type="text" id="input1" name = "text1"value="please input" onfocus="focus1()" onblur="blur1()"/>
</body>
<script type="text/javascript">
function focus1() {
// alert("foucus.")
var input1 = document.getElementById("input1");
input1.value ="";
}
function blur1() {
// alert("blur.")
var input1 = document.getElementById("input1");
input1.value = "please input";
}
2.xml的语法
1.xml的文档声明
- 创建一个文件 后缀名.xml
- 如果写xml,第一步必须写一个文档声明 (写了文档声明之后,表示xml文件的内容)
- <?xml version="1.0" encoding = gdk?>version
2.定义元素
3.定义属性
4.注释
5.特殊字符
6.CDATA区(了解)
7.PI指令(了解)