如何在一行中插入两个<input />类型?

时间:2015-07-25 11:13:00

标签: html dreamweaver

input type = "radio" name = "trvltype" value = "oneway" id = "oneway" onclick = optionbuton()>One Way
<span style = "display:inline-block;width:65px">
</span>
<input type = "radio" name = "trvltype" value = "return" id = "return" onclick = optionbuton()>Return

这是我的代码的一部分。我想在一行中添加两个选项按钮。我使用了带有样式属性的标记。我必须在此之后插入更多的单选按钮(一行中多于两个。)。所以每次我必须插入<span>。但是所有的单选按钮都不是直接的。有什么方法可以在Dreamweaver中解决这个问题吗?

2 个答案:

答案 0 :(得分:0)

你可以通过不给任何标签来做到这一点! 只需键入
   First Name<input type="text" name="fname" />
Last name<input type="text" name"lname" />

答案 1 :(得分:0)

&#13;
&#13;
<!DOCTYPE html>
<html>
<head><title>Radio Button</title></head>
<body>

<ul>
    <li  style="list-style:none;">
    	<input type = "radio" name = "trvltype" value = "oneway" id = "oneway" onclick = optionbuton()>One Way
		<input type = "radio" name = "trvltype" value = "return" id = "return" onclick = optionbuton()>Return
    </li>
</ul>

</body
</html>	
&#13;
&#13;
&#13;

根据你的问题,希望这会对你有帮助。

<!DOCTYPE html>
<html>
<head><title>Radio Button</title></head>
<body>

<ul>
    <li  style="list-style:none;">
        <input type = "radio" name = "trvltype" value = "oneway" id = "oneway" onclick = optionbuton()>One Way
        <input type = "radio" name = "trvltype" value = "return" id = "return" onclick = optionbuton()>Return
    </li>
</ul>

</body
</html>