<input type="text" name="tag" id="tag" plagioclases="inputBg" si

new HoverPopover({
el: $adExplanation,
placement: 'bottom',
html: true,
content: content
});&We're trying Google Ads to subsidize server costs. If you are logged in, you won't see ads. Hover to learn more.&Academia.edu is experimenting with adsNew Text Documentpp90 PagesB??ck Ho??e&&connect to downloadGet&txtREAD PAPERNew Text Documentpp
Log In&with&FacebookLog In&with&GoogleEmail:Password:Remember me on this computeror&Enter the email address you signed up with and we'll email you a reset link.
Academia & 2016text_field_tag
Related methods
= protected
text_field_tag(name, value = nil, options = {})
Creates a use these text fields to input smaller
chunks of text like a username or a search query.
:disabled - If set to true, the user will not be able to use this
:size - The number of visible characters that will fit in the
:maxlength - The maximum number of characters that the browser
will allow the user to enter.
:placeholder - The text contained in the field by default which is
removed when the field receives focus.
Any other key creates standard
attributes
for the tag.
'query', 'Enter your search query here'
'search', nil, placeholder: 'Enter search term...'
'request', nil, class: 'special_input'
'address', '', size: 75
'zip', nil, maxlength: 5
'payment_amount', '$0.00', disabled: true
'ip', '0.0.0.0', maxlength: 15, size: 20, class: &ip-input&
def text_field_tag(name, value = nil, options = {})
tag :input, { &type& =& &text&, &name& =& name, &id& =& sanitize_to_id(name), &value& =& value }.update(options.stringify_keys)
Place this in your helper.
It will show a message inside the text box and
remove it when someone clicks on it.
If they don’t enter a value when
they leave the field it’ll replace the message.
(Requires javascript
:defaults).
def hinted_text_field_tag(name, value = nil, hint = &Click and enter text&, options={})
value = value.nil? ? hint : value
name, value, {:onclick =& &if($(this).value == '#{hint}'){$(this).value = ''}&, :onblur =& &if($(this).value == ''){$(this).value = '#{hint}'}& }.update(options.stringify_keys)
hinted_text_field_tag :search, params[:search], &Enter name, brand or mfg.&, :size =& 30ThinkPHP3.2使用ajaxreturn案例及使用详解
首先必须引入jquery.form.js,没有的自己百度下载!ThinkPHP3.2需要这个JS代码:&script&type=&text/javascript&&
&$(function(){
&$('#form1').ajaxForm({
&beforeSubmit:&checkForm,&//&此方法主要是提交前执行的方法,根据需要设置
&success:&complete,&//&这是提交后的方法
&dataType:&'json'
&function&checkForm(){
&if(&''&==&$.trim($('#title').val())){
&$('#result').html('标题不能为空').show();
&//可以在此添加其它判断
&function&complete(data){
&if&(data.status==1){
&$('#result').).show();
&alert(data.id);
&var&html&=&'&div&class=&result&&style=\'font-weight:background:#A6FF4D\'&&div&style=&border-bottom:1px&dotted&silver&&标题:'+data.id+'&[&'+data.logintime+'&]&/div&&div&class=&content&&内容:'+data.loginip+'&/div&&/div&';
&$('#list').prepend(html);
&alert(2);
&$('#result').).show();
&/script&下面是HTML代码:&form&id=&form1&&method=&post&&action=&/login.php&&
&input&type=&text&&name=&username&&/&
&input&type=&password&&name=&password&&/&
&input&type=&submit&&&&/&
&form&当时点击表单的时候他就使用ajax提交了,PHP代码如下://用户登陆处理表单
&public&function&login(){
&//if(!IS_POST)&$this-&error(&非法操作!&);
&$db&=&M('user');
&$username&=I('username');
&$password&=I('password','','md5');
&$user&=&$db-&where(array('username'=&$username,'password'=&$password,))-&find();
&if&(!$user)&{
&$this-&error('账号或密码错误');
&if($user['lock']&==&'1'){
&$this-&error('用户被锁定,请联系管理员解锁');
//更新数据信息
&$data&=array(
&'id'&=&&$user['id'],
&'logintime'&=&&time(),
&'loginip'&=&&get_client_ip(),
&$db-&save($data);
&//$this-&success(&登陆成功&);
&$vo['status']&=&1;&//登陆成功
&$this-&ajaxReturn($vo,&json&);
&//把用登陆信息存到SESSION
&session(&id&,$user['id']);
&session(&username&,$user['username']);
&session(&logintime&,date('Y-m-d&H:i:s'),$user['logintime']);
&session(&loginip&,$user['loginip']);
&redirect(__APP__);
相关报道:
本站地址:
关键词: &
责任编辑:
已有位网友参与评论
本类周最热
分类导航: |
软件名称软件类别好评率
本站所有资源均来自互联网,本站只做收集,如本站侵犯到您的版权请发送邮件给我们,我们收到邮件后会在第一时间删除!商务QQ:1674653
Copyright (C)0 ) { $('#submenu').show(0); }" onmouseout="javascript:if( $('#submenu').length > 0 ) { $('#submenu').hide(0); }">
0 ) { $('#submenu').show(0); }" onmouseout="javascript:if( $('#submenu').length > 0 ) { $('#submenu').hide(0); }">
0 ) { $('#submenu').show(0); }" onmouseout="javascript:if( $('#submenu').length > 0 ) { $('#submenu').hide(0); }">
0 ) { $('#submenu').show(0); }" onmouseout="javascript:if( $('#submenu').length > 0 ) { $('#submenu').hide(0); }">
0 ) { $('#submenu').show(0); }" onmouseout="javascript:if( $('#submenu').length > 0 ) { $('#submenu').hide(0); }">
All Genres
Balearic/Downtempo
Disco/Re-Edits
DJ Equipment
Drum And Bass
&&Deep Dubstep
&&Dirty Dubstep/Trap/Grime
Euro Dance/Pop Dance
Footwork/Juke
Funk Soul & Jazz
&&Broken Beat/Nu Jazz/Nu Soul
&&Funk/Reissues
&&International
Hardcore/style
&&Hardstyle
&&UK Hardcore
Hip Hop/R&B
&&Deep House
&&Electro House
&&Funky/Club House
&&Hard House
&&Minimal House/Tech House
&&Progressive House
&&Scouse House
&&Ambient/Drone
&&Coldwave/Synth
&&Experimental/Electronic
&&Industrial/Noise
&&Library/Archive
&&Soundtracks
&&Classics/Ska
&&Dancehall/Ragga
&&Roots/Lovers Rock
Rock (All)
&&Folk/Americana
&&Post Rock/Experimental
&&Progressive Rock
&&Psych/Garage Rock
&&Punk/Hardcore
Studio Equipment
Techno (All)
&&Hard Techno
&&Hard Trance
&&Pop Trance
&&Psy/Goa Trance
&&Uplifting Trance
1-June-2016
8-June-2016
7-June-2016
24-May-2016
10-May-2016
1-June-2016
11-June-2016
31-May-2016
2-June-2016
31-May-2016
3-June-2016
24-May-2016
9-June-2016
18-May-2016
1-June-2016
23-May-2016

我要回帖

更多关于 input tag属性 的文章

 

随机推荐