![]() |
#2
java小蚂蚁2013-08-02 16:15
|
但是不可以有什么办法让提交的表单在当前也显示的是超链接吗
如果下面的不可以或修改麻烦 那么有其他什么办法让表单提交后在当前页显示提交后的文字的吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://code. type="text/javascript">
$(function(){
$("#address_submit_button").click(function(){
var name = $("#name").val();
var text1 = $("#text1").val();
var text2 = $("#text2").val();
$("#show").html("http:// + name + "&text1=" + text1 + "&text2="+ text2);
})
})
</script>
</head>
<body>
<form id="theForm" name="theForm" onsubmit="add_address()" method="post" action="">
<div id="user_addreeses">
<div id="" class="">
</div>
</div>
<div class="consigAddress">
<ul class="consigRbow">
<li>姓名:<input type="text" style="width:160px;" name="name" value="" size="15" class="address_input" id="name"></li>
<li>文本1:<select name="text1" class="address_input" id="text1">
<option selected="selected">男</option>
<option>女</option>
</select></li>
<li>文本2:<input type="text" style="width:150px;" name="text2" value="" size="15" class="address_input" id="text2"></li>
<li><input type="button" style="background:#666; color:#fff; width:140px; height:28px; border:0px; cursor: pointer " value="提交" id="address_submit_button">
</li>
</ul>
</div>
</form>
<div id="show"><div>
</body>
</html>
<title>无标题文档</title>
<script type="text/javascript" src="http://code. type="text/javascript">
$(function(){
$("#address_submit_button").click(function(){
var name = $("#name").val();
var text1 = $("#text1").val();
var text2 = $("#text2").val();
$("#show").html("http:// + name + "&text1=" + text1 + "&text2="+ text2);
})
})
</script>
</head>
<body>
<form id="theForm" name="theForm" onsubmit="add_address()" method="post" action="">
<div id="user_addreeses">
<div id="" class="">
</div>
</div>
<div class="consigAddress">
<ul class="consigRbow">
<li>姓名:<input type="text" style="width:160px;" name="name" value="" size="15" class="address_input" id="name"></li>
<li>文本1:<select name="text1" class="address_input" id="text1">
<option selected="selected">男</option>
<option>女</option>
</select></li>
<li>文本2:<input type="text" style="width:150px;" name="text2" value="" size="15" class="address_input" id="text2"></li>
<li><input type="button" style="background:#666; color:#fff; width:140px; height:28px; border:0px; cursor: pointer " value="提交" id="address_submit_button">
</li>
</ul>
</div>
</form>
<div id="show"><div>
</body>
</html>
[ 本帖最后由 adyheng 于 2013-7-31 15:57 编辑 ]